Commit graph

5657 commits

Author SHA1 Message Date
Mislav Marohnić
9351f272dc pr merge: fix merge queue API access for PAT consumers
The github.com API right now doesn't seem to make merge queue APIs
available to people who use PAT to authenticate gh requests. This
switches the conditional request strategy to also do feature-detection
for dotcom (instead of just for Enterprise).
2022-06-09 14:38:58 +02:00
Sam Coe
743a747804
Use go-gh for SSH hostname alias translation (#5654) 2022-06-08 21:32:29 +00:00
Sam Coe
39dd3e66e8
Use go-gh repository.ParseWithHost (#5655) 2022-06-08 21:21:59 +00:00
Mislav Marohnić
4b488a7f6a
Merge pull request #5762 from cli/codespace-start-progress
Clean up progress indicator if codespace fails to start
2022-06-08 17:48:57 +02:00
dependabot[bot]
448b13864a
Bump github.com/AlecAivazis/survey/v2 from 2.3.4 to 2.3.5 (#5775)
Bumps [github.com/AlecAivazis/survey/v2](https://github.com/AlecAivazis/survey) from 2.3.4 to 2.3.5.
- [Release notes](https://github.com/AlecAivazis/survey/releases)
- [Commits](https://github.com/AlecAivazis/survey/compare/v2.3.4...v2.3.5)

---
updated-dependencies:
- dependency-name: github.com/AlecAivazis/survey/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 14:29:04 +00:00
Mislav Marohnić
da9203c751
Merge pull request #5596 from cli/mntlty/merge_queue
merge queue support for pr merge
2022-06-08 12:33:30 +02:00
Mislav Marohnić
4c6358dcbf Guard PR merge queue queries behind feature detection 2022-06-08 12:25:22 +02:00
Ariel Deitcher
53a8737c87 pr merge: add support for Merge Queue
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-06-08 12:24:36 +02:00
Mislav Marohnić
887578a640
Merge pull request #5764 from cli/fix-repo-list
Allow repo list to work with GHES earlier than 3.3
2022-06-08 12:13:29 +02:00
Mislav Marohnić
f184d7ec58 pr create: allow forking repositories with INTERNAL visibility
The IsPrivate field of "internal" repositories is always true, but those
repositories aren't truly private and absolutely can be forked. We
shouldn't be checking for platform permissions in the client anyway, so
let's just drop this check and have the platform decide whether this is
a valid operation.
2022-06-07 17:56:06 +02:00
Mislav Marohnić
80f130184c repo edit: fix interactive mode in GHES < 3.3 2022-06-07 17:54:52 +02:00
Mislav Marohnić
aff26cbcfc Simplify repo list color check 2022-06-07 17:51:44 +02:00
Jonathan Fenwick
2abe1b3294
Remove auth logout confirmation prompt (#5751) 2022-06-07 15:26:53 +00:00
Mislav Marohnić
89886eeaf8 Fix repo visibility label in search repos output
The `Visibility` field will be empty for `search` results when made
against GHES versions < 3.3. If that is the case, fall back to
constructing the label using `IsPrivate` field.
2022-06-07 17:09:17 +02:00
Sam Coe
33975a95e4
Allow repo list to work with GHES earlier than 3.3 2022-06-06 12:45:55 -05:00
Mislav Marohnić
be9fed4e8e
Merge pull request #5763 from cli/dependabot/go_modules/github.com/stretchr/testify-1.7.2
Bump github.com/stretchr/testify from 1.7.1 to 1.7.2
2022-06-06 16:36:29 +02:00
dependabot[bot]
b5915a890a
Bump github.com/stretchr/testify from 1.7.1 to 1.7.2
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.1...v1.7.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 14:24:34 +00:00
Greggory Rothmeier
f15a8ca335
Extract LiveshareSession interface (#5725)
This will make it possible to inject a mock liveshare session for testing
2022-06-06 15:52:52 +02:00
Mislav Marohnić
8c5ae36311 Clean up progress indicator if codespace fails to start 2022-06-06 14:32:01 +02:00
Jeff Hubbard
866eccc202
Merge pull request #5705 from 8Gitbrix/users/ajeyaseelan/fix-edit-cmd
codespace edit: interactively choose a codespace
2022-06-03 10:04:31 -07:00
Fengyi Li
04ed77ddf0
Update prebuild availability status display at codespace creation (#5737) 2022-06-02 17:20:12 +00:00
Mislav Marohnić
afb69d2d31 cs edit: 💅 implementation and tests 2022-06-01 17:18:17 +02:00
Mislav Marohnić
7d71f807c4
Merge pull request #5744 from cli/dependabot/go_modules/github.com/itchyny/gojq-0.12.8
Bump github.com/itchyny/gojq from 0.12.7 to 0.12.8

Closes #5731
2022-06-01 16:48:36 +02:00
dependabot[bot]
90602244d8
Bump github.com/itchyny/gojq from 0.12.7 to 0.12.8
Bumps [github.com/itchyny/gojq](https://github.com/itchyny/gojq) from 0.12.7 to 0.12.8.
- [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.7...v0.12.8)

---
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>
2022-06-01 14:38:17 +00:00
Mislav Marohnić
76a21a4792
Merge pull request #5719 from guerinoni/fix-quote-path
Quote path of repo in order to have a valid copy paste command
2022-05-30 17:26:30 +02:00
Ashwin Jeyaseelan
a178d37682 Deleted extra file 2022-05-26 17:04:45 +00:00
Ashwin Jeyaseelan
51a7647e5d Resolve merge conflicts 2022-05-26 17:03:37 +00:00
Ashwin Jeyaseelan
61553e5e8a Added nit, removed last test due to survey.ask call wanting a terminal 2022-05-26 17:01:30 +00:00
Federico Guerinoni
b780608e90 Quote path of repo in order to have a valid copy paste command
Closes #5602
2022-05-26 12:12:56 +02:00
Ashwin Jeyaseelan
a1053c9c43 Fixed error checking in test instead of incorrectly using stderr 2022-05-25 18:55:36 +00:00
Ashwin Jeyaseelan
f22183ef27 WIP tests 2022-05-25 17:19:36 +00:00
Greggory Rothmeier
77507cd94c
Bugfix: Retention period is being sent to the API as 0 (#5706)
Co-authored-by: Jose Garcia <josebalius@github.com>
2022-05-25 17:36:27 +02:00
Mislav Marohnić
0bd36fe03a
Merge pull request #5710 from cli/completion-output-fix
Fix Cobra completion output going to stdout
2022-05-25 15:43:02 +02:00
Mislav Marohnić
7859afb586 Fix Cobra completion output going to stdout 2022-05-25 14:57:47 +02:00
Ashwin Jeyaseelan
81893b60f2 Added tests 2022-05-25 01:08:20 +00:00
Ashwin Jeyaseelan
2e84804f95 Removed incorrect test file 2022-05-24 17:46:30 +00:00
Ashwin Jeyaseelan
1084fd149b Corrected code to update codespace from selected codespace name if chosen from list of codespaces 2022-05-24 17:44:45 +00:00
Ashwin Jeyaseelan
c2c4afdf6d Updated edit.go 2022-05-24 16:39:57 +00:00
Mislav Marohnić
ec12d27db5
Merge pull request #5703 from cli/version-flag-fix
Fix --version flag printing to stdout
2022-05-24 17:06:32 +02:00
Mislav Marohnić
cfaca91d06 Fix --version flag printing to stdout 2022-05-24 16:21:13 +02:00
Ahmed Adan
31bee2e639
Add --upstream-remote-name flag to gh replo clone (#5619) 2022-05-24 13:12:01 +02:00
Mislav Marohnić
eb4439d781
Merge pull request #5698 from cli/deprecation-stderr
Write Cobra deprecation messages to stderr
2022-05-24 12:36:18 +02:00
Heath Stewart
b54ff58382
Parallelize label clone (#5687) 2022-05-24 10:04:05 +02:00
Mislav Marohnić
6703677a95
Stop bumping winget manifest as part of release automation (#5699) 2022-05-24 09:57:24 +02:00
Mislav Marohnić
2139e763fb Write Cobra deprecation messages to stderr
We used to do the equivalent of `rootCmd.SetOut(os.Stdout)` because we
thought that Cobra's "Out" stream represents standard output. However,
upon closer inspection it turns out that this is Cobra's stream for
usage errors and deprecation warnings, and those we want written to
stderr as well. It is not clear to me why Cobra maintains a distinction
between "Out" and "Err" streams since both seem to go to sdterr by
default.

This change also ceases our usage of `command.Print()` functions in
favor of explicitly writing to `IOStreams.Out/ErrOut`.
2022-05-23 20:23:42 +02:00
Mislav Marohnić
d2683a1370
Merge pull request #5694 from jsoref/issue-5680
Clarify that `ShowResponseHeaders` includes status line
2022-05-23 19:03:38 +02:00
Mislav Marohnić
e4485c74d2
Merge pull request #5695 from cli/dependabot/github_actions/goreleaser/goreleaser-action-3
Bump goreleaser/goreleaser-action from 2 to 3
2022-05-23 16:44:51 +02:00
dependabot[bot]
edf6f46dad
Bump goreleaser/goreleaser-action from 2 to 3
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2 to 3.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 14:33:44 +00:00
Josh Soref
7d99a98f02 Clarify that ShowResponseHeaders includes status line 2022-05-23 10:18:50 -04:00
Sam Coe
ebbf2ac096
Fix owner qualifier for search queries (#5693) 2022-05-23 13:00:32 +00:00