Commit graph

5446 commits

Author SHA1 Message Date
Mislav Marohnić
b0360612d2
Merge pull request #4521 from cli/jg/bind-locally
codespace: switches port binding to 127.0.0.1 where possible
2021-10-14 20:29:21 +02:00
Mislav Marohnić
78443964d4
Merge pull request #4513 from cli/missing-oauth-scopes
Warn about missing OAuth scopes when reporting HTTP 4xx errors
2021-10-14 20:21:13 +02:00
Mislav Marohnić
89ad870190 auth refresh: preserve existing scopes when requesting new ones
When there was a previously valid token that was granted some scopes,
ensure all those scopes will be re-requested when doing the
authentication flow for the new token.
2021-10-14 19:52:59 +02:00
nate smith
4996ba2ba4 Merge remote-tracking branch 'origin/trunk' into relative-path 2021-10-14 12:24:27 -05:00
Mislav Marohnić
64a19ee71f Remove OAuth scopes checking logic from ssh-key commands
Scopes checking is now handled on the HTTP client level for all commands.
2021-10-14 18:36:55 +02:00
Nate Smith
78ac77180e
Merge pull request #3950 from bchadwic/browse-commit
Add feature open latest commit in gh browse
2021-10-14 11:31:15 -05:00
nate smith
5bdaab882b fix 2021-10-14 11:25:33 -05:00
Jose Garcia
b0905a415f
Merge pull request #4508 from cli/jg/codespace-stop
codespace stop: new command to stop a running codespace
2021-10-14 11:22:25 -04:00
Jose Garcia
0748e658cc Switches port binding to 127.0.0.1 where possible 2021-10-14 11:07:25 -04:00
Jose Garcia
5e56b4a7ce Fix tests 2021-10-14 09:21:03 -04:00
Jose Garcia
3544275c2f Implement new API payload for a Codespace 2021-10-14 09:10:15 -04:00
nate smith
d72d0f47f6 Merge remote-tracking branch 'origin/trunk' into browse-commit 2021-10-13 16:53:50 -05:00
Mislav Marohnić
2ca18e0600 Warn about missing OAuth scopes when reporting HTTP 4xx errors
If a 4xx server response lists scopes in the X-Accepted-Oauth-Scopes
header that are not present in the X-Oauth-Scopes header, the final
error messaging on stderr will now include a hint for the user that they
might need to request the additional scope:

    $ gh codespace list
    error getting codespaces: HTTP 403: Must have admin rights to Repository. (https://api.github.com/user/codespaces?per_page=30)
    This API operation needs the "codespace" scope. To request it, run:  gh auth refresh -h github.com -s codespace
2021-10-13 23:24:14 +02:00
Parth Patel
3a21dfa1c5 lint fix 2021-10-13 16:41:46 -04:00
Parth Patel
69db6fca25 res comments 2021-10-13 16:31:54 -04:00
Parth Patel
c1c2946179 minor fix 2021-10-13 15:04:43 -04:00
Jose Garcia
d5c9630fae
Merge pull request #4511 from cli/jg/keepalive-fix
codespace ssh: fix for nil logger on non-debugging scenarios
2021-10-13 14:44:10 -04:00
Jose Garcia
3dbec86556 PR Feedback 2021-10-13 14:30:33 -04:00
Jose Garcia
d6b5157eff Fix for nil logger on non-debugging scenarios 2021-10-13 14:15:26 -04:00
Marwan Sulaiman
b9bdef2b00
Add org scoped port forwarding + fix test formatting (#4497)
* Add org scoped port forwarding + fix test formatting

* Redesign port visibility

* Update pkg/cmd/codespace/ports.go

Co-authored-by: Jose Garcia <josebalius@github.com>

* Change sub command to privacy

* Example pr comment

* Fix test mock

* Fix test mock

Co-authored-by: Jose Garcia <josebalius@github.com>
2021-10-13 13:56:03 -04:00
Jose Garcia
07fa60b69a PR Feedback 2021-10-13 11:46:57 -04:00
Jose Garcia
be10950058 Update mocks 2021-10-13 11:04:15 -04:00
Jose Garcia
4fb4a21efd Rename + docs 2021-10-13 10:57:50 -04:00
Jose Garcia
97b52b30fc Merge branch 'trunk' of github.com:cli/cli into jg/liveshare-keepalive 2021-10-13 10:45:40 -04:00
Jose Garcia
ea0d0a543f Initial StopCodespace implementation
- API
- Command
2021-10-13 07:45:54 -04:00
Sam Coe
defbf0f306
Make extension upgrade output more friendly 2021-10-12 16:47:19 -07:00
Parth Patel
b106e606e1 final touches 2021-10-12 18:56:56 -04:00
Parth Patel
4afd1e06bf optimize command 2021-10-12 18:56:32 -04:00
Parth Patel
3a936f65e2 Merge branch 'trunk' into repo-rename 2021-10-12 18:47:52 -04:00
Parth Patel
c639161394 final touches 2021-10-12 18:46:15 -04:00
Jose Garcia
5170a2931f Switch to standard lib log.Logger & support dfile
- --debug-file flag can now be used in conjuction with --debug to
  specify the debug file path
- Push out logger concerns to callers of liveshare
2021-10-12 15:45:05 -04:00
Meijke
8c9049a364
Merge branch 'trunk' into repo-delete 2021-10-12 11:02:27 -07:00
meiji163
548b39c140 add one test 2021-10-12 10:50:54 -07:00
meiji163
5d433021bd simplify err handling and change flags 2021-10-12 10:16:14 -07:00
Sam Coe
ed3427974c
Use concurrency to check for extension updates 2021-10-12 09:44:41 -07:00
Parth
ec554822b8
Add repo archive command (#4410)
Co-authored-by: meiji163 <mysatellite99@gmail.com>
2021-10-12 12:48:40 +02:00
Parth Patel
7e6cf79355 minor changes 2021-10-11 17:38:20 -04:00
Mateusz Urbanek
cedbbe3c2a
Add limit flag to codespace list (#4453)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-10-11 18:32:40 +00:00
meiji163
9ea36de269 add tests 2021-10-08 20:32:07 -07:00
Parth Patel
f7ec49e809 lint fix 2021-10-08 22:05:36 -04:00
Parth Patel
c714ed6fdf added api tests 2021-10-08 22:02:59 -04:00
Parth
c894587761 added function tests 2021-10-08 21:02:40 -04:00
Parth
3001afda77 full lint fix 2021-10-08 17:38:56 -04:00
Parth Patel
28bfd8e773 lint fix 2021-10-08 17:21:03 -04:00
Parth Patel
b9c60e8dc8 remove go.mod change 2021-10-08 17:18:15 -04:00
Parth Patel
2ff8732836 minor fix 2021-10-08 17:05:36 -04:00
Parth Patel
e6e8d72428 added full functionality 2021-10-08 17:03:37 -04:00
Parth Patel
7725116428 works 2021-10-08 15:37:01 -04:00
Parth
1b4abd67a9 added api 2021-10-08 15:06:43 -04:00
Mislav Marohnić
e4c8aa3b2b Add tests for pr diff --patch 2021-10-08 13:53:19 +02:00