Mislav Marohnić
54e292703b
Merge pull request #2054 from cli/ghe-auth
...
Handle edge cases in GHE auth
2020-10-06 14:27:32 +02:00
Mislav Marohnić
115357c6af
Merge pull request #2035 from cli/ghe-2.20-compat
...
GHE 2.20 compatibility for `pr` commands
2020-10-06 12:50:08 +02:00
Nate Smith
14a5e00c4a
Merge pull request #2034 from cristiand391/check-gist-ownership
...
Check gist ownership before editing
2020-10-05 16:20:34 -05:00
Nate Smith
d63b5a9297
Merge pull request #1763 from Matt-Gleich/trunk
...
♻️ Refactor gist list to use graphQL
2020-10-05 16:15:39 -05:00
Nate Smith
edec480b34
Merge pull request #2057 from cli/auth-scopes-doc
...
Specify minimum required token scopes in `gh help auth login`
2020-10-05 16:00:25 -05:00
Nate Smith
9869b874f8
Merge pull request #2072 from jmdejong/garden-resore-terminal
...
restore tty settings after gh repo garden
2020-10-05 15:34:18 -05:00
vilmibm
fa68a3a858
linter appeasement
2020-10-05 15:19:49 -05:00
Nate Smith
c1af527cbc
Merge pull request #2091 from rex4539/typos
...
Fix typos
2020-10-05 15:03:47 -05:00
Mislav Marohnić
cd2adfeba0
Port listing gists to githubv4 GraphQL client
...
- Fetching more than 100 gists is now supported
- The GraphQL query name is now `GistList` instead of `ListGists` for
consistency with other queries
- Avoid fetching unnecessary Files fields
- Gists are now rendered in the order that the API returned them in
- The gist timestamp for machine-readable output is now rendered in
RFC3339 format instead of in `time.Time.String()` format which is only
meant for debugging and is not considered stable
- Ensure newlines in gist description are rendered as spaces
2020-10-05 20:33:31 +02:00
Mislav Marohnić
1859728f7e
Fix parsing gist list --public/--secret flags
...
It's not sufficient to use `Changed("public")` to test if a boolean flag
was activated, since the user might have passed `--public=false`.
Instead, check the true value of the flag.
The `--public` and `--secret` flags should be mutually exclusive, so now
if both are activated, `--secret` takes precedence.
2020-10-05 20:27:05 +02:00
Mislav Marohnić
1eb972292b
Merge pull request #2092 from antleblanc/patch-1
...
Add link to Homebrew and MacPorts
2020-10-05 12:05:00 +02:00
Antoine Leblanc
b047d63555
Add link to Homebrew and MacPorts
2020-10-04 21:17:48 +02:00
Dimitris Apostolou
6f550b5d12
Fix typos
2020-10-04 22:16:30 +03:00
Matthew Gleich
f124370154
♻️ Refactor to only pass time in once for test
...
Signed-off-by: Matthew Gleich <email@mattglei.ch>
2020-10-04 15:02:13 -04:00
Matthew Gleich
d8ef8b836e
🐛 Fix stubs
...
Signed-off-by: Matthew Gleich <email@mattglei.ch>
2020-10-04 01:57:36 -04:00
troido
974c6d8958
restore tty settings after gh repo garden
...
the command 'gh repo garden' used to leave the terminal in noecho mode when exiting
This restores the tty settings to their state before running 'gh repo garden'
2020-10-03 11:01:38 +02:00
Mislav Marohnić
7663acdc29
Improve HTTP caching layer
...
- make thread-safe
- only cache GET, HEAD, and GraphQL requests
- only cache non-5xx, non-403 responses
- include `Accept` and `Authorization` headers in cache key
2020-10-02 15:19:40 +02:00
Mislav Marohnić
f7a82a216b
Avoid error from cache file being prematurely closed
...
I have no idea what's going on there, so I'll just give up the streaming
approach and read the entire contents of the cache file to memory.
https://github.com/cli/cli/pull/2035/checks?check_run_id=1194798056
2020-10-01 22:06:15 +02:00
Mislav Marohnić
49909b5123
Tweak gh auth login examples
2020-10-01 19:56:56 +02:00
Mislav Marohnić
cc2b86f3a6
Specify minimum required token scopes in gh help auth login
2020-10-01 19:56:33 +02:00
Mislav Marohnić
1d435a3e2e
Ensure that cache file is closed after reading
2020-10-01 19:18:11 +02:00
Mislav Marohnić
61609db9ef
Cover HTTP 402 in oauth tests
2020-10-01 17:21:35 +02:00
Mislav Marohnić
93642529da
Enforce correct content-type in Device Flow detection
2020-10-01 17:09:47 +02:00
Mislav Marohnić
5f8648159d
Fix handling of HTTP 403 in Device Flow detection
2020-10-01 17:09:14 +02:00
Mislav Marohnić
93c8fc1e98
Add tests for GraphQL introspection
2020-10-01 16:33:56 +02:00
Nate Smith
72eeae9d1d
Update CONTRIBUTING.md
2020-09-30 17:17:58 -05:00
Mislav Marohnić
0ef2863ede
Cache GHE responses for schema queries
...
This speeds up `pr`-related commands for GHE by caching schema
introspection queries for 24h.
2020-09-30 19:09:15 +02:00
Mislav Marohnić
ff925fb480
Resolve @me to current username on GHE
...
It looks like GHE v2.20 does not support `@me` in search yet.
2020-09-30 19:05:06 +02:00
Mislav Marohnić
bed9d11f7a
Avoid querying statusCheckRollup or reviewDecision on unsupported GHE
...
We first ask the GHE server for whether it supports these fields.
2020-09-30 19:04:09 +02:00
Nate Smith
a358bb73db
Merge pull request #1969 from buck10/trunk
...
Fix links to files in the docs directory
2020-09-30 11:09:20 -05:00
Cristian Dominguez
c6b9e8454f
Update gist edit tests
2020-09-30 12:35:22 -03:00
Cristian Dominguez
67c0a1a409
Check gist ownership before editing
2020-09-30 12:35:04 -03:00
Harsh Shandilya
0107b00043
Don't override user provided title and body when --fill is used ( #1994 )
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-30 16:15:30 +02:00
Sam
091d550cde
Merge pull request #2005 from cli/small-refactors
...
Small readability and code organization refactors
2020-09-30 13:05:17 +02:00
Sam Coe
74d6eb96be
Address PR comments
2020-09-30 12:55:05 +02:00
Sam Coe
bda27a46ae
Extract version command
2020-09-30 12:49:17 +02:00
Sam Coe
1a1a6303cd
Move disable auth check to bottom
2020-09-30 12:49:17 +02:00
Sam Coe
53a97c3414
Extract rootFlagErrrorFunc into root help
2020-09-30 12:49:17 +02:00
Sam Coe
f00a0f2854
Move completion command out of root package
2020-09-30 12:49:17 +02:00
Sam Coe
c52fc72291
Extract bareHTTPClient function
2020-09-30 12:49:14 +02:00
Mislav Marohnić
ab863adae3
Merge pull request #2021 from tgyurci/cat-pager
...
Disable pager when set to "cat"
2020-09-30 11:09:10 +02:00
Teubel György
9b2fe1ee30
Disable pager when set to "cat"
2020-09-29 23:21:59 +02:00
Nate Smith
e24035681d
Merge pull request #2003 from cristiand391/refactor-gist-create
...
Refactor gist create to reuse existing structs
2020-09-29 15:27:31 -05:00
Nate Smith
127d0b8717
Merge pull request #2020 from tgyurci/gh-pager-env
...
Add support for GH_PAGER
2020-09-29 14:52:58 -05:00
Nate Smith
b987cfb39e
Merge pull request #1955 from thealamu/trunk
...
Avoid interface for collecting file descriptors
2020-09-29 11:37:33 -05:00
Nate Smith
aa72881baa
Merge pull request #1962 from ricardoseriani/change-default-answer-after-delete-branch
...
Set default answer to "no" for "deleting branch after merge" question
2020-09-29 11:29:41 -05:00
Nate Smith
cc6a7887ab
Merge pull request #2022 from cli/contrib
...
mention new core label in contributing docs
2020-09-29 11:00:28 -05:00
vilmibm
91fcfa548f
Sentence Case.
2020-09-29 11:00:12 -05:00
vilmibm
746ab7354a
mention new core label in contributing docs
2020-09-29 10:47:51 -05:00
Teubel György
b71261219c
Add support for GH_PAGER
2020-09-29 17:42:25 +02:00