Mislav Marohnić
a6776d0ba2
Allow more HTTP 40x codes to trigger fallback to old OAuth flow
...
I want to avoid falling back to the old OAuth flow for just any HTTP
4xx/5xx because other statuses should be allowed to surface a problem
with a request or the server.
2020-08-14 17:31:23 +02:00
Mislav Marohnić
60eebd2896
Implement OAuth Device Authorization flow
...
Before, we implemented the OAuth app authorization flow which requires a
callback URL. To provide such a URL, we had to spin up a local HTTP
server, which was brittle and did not cover cases where a person might
want to authenticate with a browser that runs on a different machine
than the GitHub CLI process.
This implements the OAuth Device Authorization flow where the user is
given a one-time code and asked to paste it in the browser flow. There
is no callback URL, so we can avoid spinning up a local server, and the
user may open a browser on any of their devices, as long as they provide
the correct one-time code.
If the Device Authorization flow is detected to be unavailable for the
OAuth app (right now, it's specifically enabled for GitHub CLI) or for
an older GitHub Enterprise instance, this falls back to the old app
authentication flow.
2020-08-13 19:21:08 +02:00
Brandon Wilson
0d60798ca4
Gist Create - Output Filename ( #1498 )
2020-08-13 13:38:49 +02:00
Mislav Marohnić
26a5f118c1
Merge pull request #1516 from cli/branch-placeholder-docs
...
Add documentation for ":branch" placeholder
2020-08-13 13:11:07 +02:00
Mislav Marohnić
e7a8b1e94e
Add documentation for ":branch" placeholder
2020-08-12 14:54:58 +02:00
Mislav Marohnić
55a13a32b4
Merge pull request #1515 from fsmiamoto/branch-substitute
...
Add `:branch` placeholder for API calls
2020-08-12 14:29:54 +02:00
Francisco Miamoto
800be370de
propagate error from closure
2020-08-12 09:18:43 -03:00
Francisco Miamoto
bba2d6d204
improve test cases
2020-08-12 09:09:37 -03:00
Francisco Miamoto
b83342856b
use factory method for branch
...
Also, improve the handling for the branch placeholder
2020-08-12 09:01:17 -03:00
Francisco Miamoto
9ebcec9aaf
handle a detached head
2020-08-12 08:52:39 -03:00
Francisco Miamoto
0c10f67cd5
add branch placeholder for api calls
2020-08-12 08:52:39 -03:00
Mislav Marohnić
291cdeddf2
Merge pull request #1500 from cli/issue-commands-isolate
...
Isolate remaining old-style commands
2020-08-12 12:35:13 +02:00
Mislav Marohnić
aa774c4993
Merge remote-tracking branch 'origin' into issue-commands-isolate
2020-08-12 12:11:01 +02:00
Nate Smith
ec2e8a86b3
Merge pull request #1495 from vilmibm/auth-status
...
auth status
2020-08-11 17:11:28 -05:00
vilmibm
37322ec333
less spacing
2020-08-11 16:45:35 -05:00
vilmibm
6c64cb8d23
remove vestigial return from HasMinimumScopes
2020-08-11 16:33:13 -05:00
vilmibm
36b2d3f6a7
ensure that config is not written
2020-08-11 16:24:08 -05:00
vilmibm
ba2b8d50a1
minor
2020-08-11 16:20:03 -05:00
vilmibm
cd32303404
auth status formatting
2020-08-11 16:16:59 -05:00
vilmibm
3a33735da8
be more helpful
2020-08-11 15:58:00 -05:00
vilmibm
f358e600ac
use SilentError
2020-08-11 15:58:00 -05:00
vilmibm
ec25b735ab
gh auth status
2020-08-11 15:58:00 -05:00
Mislav Marohnić
9f5daeca19
Merge pull request #1475 from shihanng/issue-1456__clone-flag-help
...
Provide better error message for gh repo clone
2020-08-11 17:30:09 +02:00
Mislav Marohnić
00bdedb418
💅 Tweak wording
2020-08-11 17:06:36 +02:00
Mislav Marohnić
d876cf15b0
Merge remote-tracking branch 'origin' into issue-1456__clone-flag-help
2020-08-11 16:57:24 +02:00
Mislav Marohnić
a7b450b6b9
Merge pull request #1485 from cli/pr-commands-isolate-3
...
Isolate remaining pr commands
2020-08-11 15:40:43 +02:00
Mislav Marohnić
7e67068d61
Merge pull request #1468 from cli/pr-commands-isolate-2
...
Isolate pr view, merge, status commands
2020-08-11 15:40:18 +02:00
Mislav Marohnić
a6e78d74de
Merge branch 'pr-commands-isolate-3' into issue-commands-isolate
2020-08-11 15:40:05 +02:00
Mislav Marohnić
fcaf912961
Merge branch 'pr-commands-isolate-2' into pr-commands-isolate-3
2020-08-11 15:30:09 +02:00
Mislav Marohnić
ce5b5cac64
Merge remote-tracking branch 'origin' into pr-commands-isolate-2
2020-08-11 15:29:04 +02:00
Mislav Marohnić
2b9de23637
Extract alias expansion into a separate package
2020-08-11 15:18:48 +02:00
Mislav Marohnić
172ea2b078
Isolate all alias commands
2020-08-11 13:57:48 +02:00
Mislav Marohnić
23337e0b07
Merge pull request #1494 from mmontes11/generalize-gql-error-parsing
...
Generalize REST error parsing
2020-08-10 16:30:45 +02:00
Mislav Marohnić
b4f1dd86c1
Merge pull request #1507 from cli/period-drama
...
Remove period from gh alias --help's output
2020-08-10 12:51:03 +02:00
Lee Reilly
cee93b08f0
Remove period from command description for consistency
2020-08-08 17:13:28 -07:00
Mislav Marohnić
3c55b29446
🔥 colorableOut
2020-08-07 17:02:24 +02:00
Mislav Marohnić
7f6d687629
Isolate config command
2020-08-07 16:59:23 +02:00
Mislav Marohnić
d933cd91d4
Migrate completion command
2020-08-07 15:22:49 +02:00
Mislav Marohnić
dbbf76df10
Cleanup in context
2020-08-07 14:51:48 +02:00
Mislav Marohnić
47cef736f4
Fix GH_REPO override
2020-08-07 14:47:58 +02:00
Mislav Marohnić
aef1a4ba4d
Extract root command and factory logic into separate packages
2020-08-07 14:40:33 +02:00
Martín Montes
27765f9987
Generalize REST error parsing
2020-08-07 14:22:20 +02:00
Mislav Marohnić
5e24e0d9b9
🔥 unused legacy helpers
2020-08-07 00:48:50 +02:00
Mislav Marohnić
34cc84c1e0
Provide consistent factory functions for top-level commands
2020-08-07 00:45:45 +02:00
Mislav Marohnić
c00fe73d5a
Isolate issue commands
2020-08-07 00:27:55 +02:00
Nate Smith
7f5aad56cb
Merge pull request #1491 from cli/auth-logout
...
auth logout
2020-08-06 15:44:45 -05:00
Mislav Marohnić
20e30453d3
Fix tests that rely on stubbed table printer output
2020-08-06 21:45:16 +02:00
Mislav Marohnić
6490d7717c
Fix --repo override taking effect for pr commands
2020-08-06 21:39:46 +02:00
Mislav Marohnić
5404fb2362
Wrap up migrating all pr commands
2020-08-06 21:21:35 +02:00
vilmibm
9da7539500
gh auth logout
2020-08-06 12:50:01 -05:00