Commit graph

4768 commits

Author SHA1 Message Date
Mislav Marohnić
c2abe170d8
Merge pull request #4512 from cli/changelog-api
Generate release notes using the new API
2021-10-14 20:29:12 +02:00
Mislav Marohnić
1464a8a0f3 Generate release notes using the new API
https://docs.github.com/en/rest/reference/repos#generate-release-notes-content-for-a-release
2021-10-14 20:22:38 +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
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
Mislav Marohnić
693193fe84 Consistent error handling in codespaces API operations
Using HandleHTTPError ensures that hints regarding insufficient OAuth
scopes will be properly reported on stderr.
2021-10-14 18:16:04 +02:00
Mislav Marohnić
2c3f02ee62 Ensure NOT_FOUND error when querying private repos using insufficient scope 2021-10-14 17:31:21 +02: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
Mislav Marohnić
fccc910166
Merge pull request #4517 from cli/macos-firewall-prompt-skip
Avoid macOS prompt to allow incoming connections in liveshare tests
2021-10-14 16:15:42 +02:00
Mislav Marohnić
d68126af99 Avoid macOS prompt to allow incoming connections in liveshare tests
Listening on the localhost interface disallows connections from the
outside anyway, so the OS firewall doesn't have to prompt whether the
user wants to allow incoming connections to the Go process.
2021-10-14 14:23:36 +02: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
Mislav Marohnić
53479c712c
Merge pull request #4510 from cli/dependabot-patch
Configure Dependabot to only consider patch version bumps
2021-10-13 21:01:39 +02: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
Mislav Marohnić
9f1a1d8805
Merge pull request #4509 from cli/downgrade-spinner
Downgrade spinner package due to cleanup bug
2021-10-13 20:12:17 +02:00
Mislav Marohnić
127e2dae99 Configure Dependabot to only consider patch version bumps
https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#ignore
2021-10-13 20:06:19 +02: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
Mislav Marohnić
cf80fbe509 Downgrade spinner package due to cleanup bug
The spinner is not successfully visually cleaned up after calling its
Stop method. https://github.com/briandowns/spinner/issues/123
2021-10-13 19:45:20 +02:00
Jose Garcia
07fa60b69a PR Feedback 2021-10-13 11:46:57 -04:00
Jose Garcia
a033b85fa2
Merge pull request #4461 from cli/jg/liveshare-keepalive
codespace/liveshare keepalive: keep LS sessions alive with PF traffic
2021-10-13 11:21:43 -04:00
Jose Garcia
be10950058 Update mocks 2021-10-13 11:04:15 -04:00
Mislav Marohnić
12e5b94205
Merge pull request #4507 from alefranz/patch-1
Update winget installation instructions
2021-10-13 16:58:36 +02: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
Alessio Franceschelli
961cd57b87
Update winget installation instructions 2021-10-13 15:01:50 +01:00
Alan Donovan
675ee316e9
Merge pull request #4504 from cli/show-http-status
cs create: include HTTP status code in error from /user/codespaces/*/start
2021-10-13 09:00:37 -04:00
Jose Garcia
aa2270799c
Merge pull request #4505 from cli/jg/fix-connection
codespace: fix for API response body change
2021-10-13 08:29:11 -04:00
Jose Garcia
77a86e8611 Fix for API response body change
- Connection is now embedded within the top level of the Codespace
  payload instead of inside the environment.
2021-10-13 08:07:59 -04:00
Jose Garcia
ea0d0a543f Initial StopCodespace implementation
- API
- Command
2021-10-13 07:45:54 -04:00
Alan Donovan
9302e68c92 Include HTTP status code in error 2021-10-13 07:00:55 -04:00
Sam
968b093eda
Merge pull request #4396 from cli/speedy-extension-list
Use concurrency to check for extension updates
2021-10-12 15:53:51 -07: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
Mislav Marohnić
7abf682e26
Merge pull request #4480 from cli/codeql-dependabot
CodeQL-Dependabot compatibility
2021-10-12 18:56:24 +02:00
Sam Coe
ed3427974c
Use concurrency to check for extension updates 2021-10-12 09:44:41 -07:00
Mislav Marohnić
efd0b677ef
Merge pull request #4496 from cli/dependabot/go_modules/github.com/gabriel-vasile/mimetype-1.4.0
Bump github.com/gabriel-vasile/mimetype from 1.1.2 to 1.4.0
2021-10-12 17:27:29 +02:00
dependabot[bot]
5fd9f68c85
Bump github.com/gabriel-vasile/mimetype from 1.1.2 to 1.4.0
Bumps [github.com/gabriel-vasile/mimetype](https://github.com/gabriel-vasile/mimetype) from 1.1.2 to 1.4.0.
- [Release notes](https://github.com/gabriel-vasile/mimetype/releases)
- [Commits](https://github.com/gabriel-vasile/mimetype/compare/v1.1.2...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/gabriel-vasile/mimetype
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-12 14:35:16 +00:00
Parth
ec554822b8
Add repo archive command (#4410)
Co-authored-by: meiji163 <mysatellite99@gmail.com>
2021-10-12 12:48:40 +02: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
Mislav Marohnić
4d274bd24e
Merge pull request #4485 from cli/dependabot/go_modules/github.com/creack/pty-1.1.16
Bump github.com/creack/pty from 1.1.13 to 1.1.16
2021-10-11 18:30:57 +02:00
Mislav Marohnić
3956510cbc
Merge pull request #4484 from cli/dependabot/go_modules/github.com/hashicorp/go-version-1.3.0
Bump github.com/hashicorp/go-version from 1.2.1 to 1.3.0
2021-10-11 18:25:59 +02:00
Mislav Marohnić
af522e4e69
Merge pull request #4482 from cli/dependabot/go_modules/github.com/itchyny/gojq-0.12.5
Bump github.com/itchyny/gojq from 0.12.4 to 0.12.5
2021-10-11 18:25:23 +02:00
dependabot[bot]
adc3072303
Bump github.com/creack/pty from 1.1.13 to 1.1.16
Bumps [github.com/creack/pty](https://github.com/creack/pty) from 1.1.13 to 1.1.16.
- [Release notes](https://github.com/creack/pty/releases)
- [Commits](https://github.com/creack/pty/compare/v1.1.13...v1.1.16)

---
updated-dependencies:
- dependency-name: github.com/creack/pty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 16:24:32 +00:00
Mislav Marohnić
a364cd3487
Merge pull request #4483 from cli/dependabot/go_modules/github.com/cpuguy83/go-md2man/v2-2.0.1
Bump github.com/cpuguy83/go-md2man/v2 from 2.0.0 to 2.0.1
2021-10-11 18:12:32 +02:00
Mislav Marohnić
8cc77bd61e Fix test expectation for man contents
https://github.com/cpuguy83/go-md2man/pull/74
2021-10-11 18:05:52 +02:00
dependabot[bot]
32c17b2d95
Bump github.com/itchyny/gojq from 0.12.4 to 0.12.5
Bumps [github.com/itchyny/gojq](https://github.com/itchyny/gojq) from 0.12.4 to 0.12.5.
- [Release notes](https://github.com/itchyny/gojq/releases)
- [Changelog](https://github.com/itchyny/gojq/blob/main/CHANGELOG.md)
- [Commits](https://github.com/itchyny/gojq/compare/v0.12.4...v0.12.5)

---
updated-dependencies:
- dependency-name: github.com/itchyny/gojq
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 15:29:21 +00:00
Mislav Marohnić
152c2888d7
Merge pull request #4481 from cli/dependabot/go_modules/github.com/mattn/go-colorable-0.1.11
Bump github.com/mattn/go-colorable from 0.1.8 to 0.1.11
2021-10-11 17:23:35 +02:00