Commit graph

3427 commits

Author SHA1 Message Date
Andy Feller
c088951944 Fix host handling in variable and secret delete
This change updates `gh variable delete` and `gh secret delete` to use the host associated with the repository rather than the default host.  Along with these changes is minor refactoring of the tests to ensure appropriate Dotcom vs GHES targeting works as expected.

Minor edit to `gh variable get` testing to simplify some conditional logic in test setup.
2024-08-02 15:11:22 -04:00
Andy Feller
22a5a4c899 Update gh variable get to use repo host
Closes #9274

This change addresses a bug where repository and repository environment variables are not being retrieved from the appropriate host, causing GHES users to fail without specifying `GH_HOST` to force `gh variable set` to do the right thing.

In addition, the tests for this command have been updated to check both github.com and GHES variations to ensure this works.
2024-08-02 10:36:32 -04:00
ejahnGithub
87ff22d37d Merge branch 'tmp-07-31' into eugene/gh-attestation-case-insensitivity 2024-07-31 07:31:58 -07:00
ejahnGithub
1eaf712dd1 update test and remove logic to check SourceRepositoryOwnerURI is empty string 2024-07-31 07:29:43 -07:00
Eugene
12715fdcc6
Merge branch 'trunk' into eugene/gh-attestation-case-insensitivity 2024-07-30 14:07:09 -07:00
ejahnGithub
596ee8bd71 update test 2024-07-30 13:22:49 -07:00
ejahnGithub
580ddf6997 minor fix 2024-07-30 13:14:16 -07:00
ejahnGithub
e21e5ef5c5 update test 2024-07-30 13:09:28 -07:00
ejahnGithub
c1adb1a6cf added 2024-07-30 12:24:27 -07:00
ejahnGithub
dc4e9cb532 handle attest case insensitivity 2024-07-30 12:11:25 -07:00
Babak K. Shandiz
58e6196777
Fix missing variable
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-29 21:41:43 +01:00
Babak K. Shandiz
a73ae65ca8
Use closure-scoped variable to catch --remove-milestone option
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-29 21:40:24 +01:00
Babak K. Shandiz
842562d3db
Use closure-scoped variable to catch --remove-milestone option
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-29 21:40:23 +01:00
Babak K. Shandiz
c9fb4ed099
Verify --milestone and --remove-milestone are not assignable at the same time
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-28 15:44:05 +01:00
Babak K. Shandiz
605b4b19e1
Assert correct parsing of --remove-milestone option
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-28 15:43:38 +01:00
Babak K. Shandiz
6dc8cc41d0
Verify --body and --body-file are not assignable at the same time 2024-07-28 15:41:54 +01:00
Babak K. Shandiz
1520292726
Add --remove-milestone option
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-28 15:40:38 +01:00
Babak K. Shandiz
4c8ec84e26
Improve --remove-milestone option description
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-28 15:23:19 +01:00
Babak K. Shandiz
6e34e81b76
Point to Editable.MilestoneId method
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-28 15:22:54 +01:00
Babak K. Shandiz
93621436e8
Merge branch 'trunk' into 9292-add-remove-milestone-option 2024-07-28 13:27:24 +01:00
Andy Feller
18894b6386
Merge branch 'trunk' into fix-8845 2024-07-26 08:12:24 -04:00
Zach Steindler
658f125ab3
Update sigstore-go in gh CLI to v0.5.1 (#9366)
Signed-off-by: Zach Steindler <steiza@github.com>
2024-07-25 20:59:39 +02:00
Andy Feller
8da9ee2437
Merge pull request #9358 from cli/9338-gh-attestation-can-fail-with-http-401-without-exiting-with-exitcode-4
Slightly clarify when CLI exits with code 4
2024-07-24 11:56:03 -04:00
William Martin
adc8b82d11
Merge pull request #9355 from cli/wm/9241-fulldatabaseid
Expose fullDatabaseId for PR json export
2024-07-24 07:45:19 +02:00
William Martin
c16becc07e Slightly clarify when CLI will exit with 4 2024-07-23 16:44:49 +02:00
Andy Feller
78c33617cf
Merge pull request #9356 from cli/9278-gh-release-view-with-json-parser-outputs-node_id-instead-of-id
Expose json databaseId field for release commands
2024-07-23 10:06:57 -04:00
William Martin
c13d161271 Export databaseId for releases 2024-07-23 13:41:56 +02:00
William Martin
99ff84bdd9 Alphabetise release json fields 2024-07-23 13:41:56 +02:00
William Martin
13dea3e35d Add test for release view json export fields 2024-07-23 13:41:56 +02:00
William Martin
8a0d361bac Expose fullDatabaseId for PR json export 2024-07-23 13:23:10 +02:00
William Martin
32e499e090 Add examples for template usage in PR and issue creation 2024-07-23 13:14:27 +02:00
Stausssi
e7606363fb
document exit code behavior 2024-07-22 20:36:22 +02:00
Chris Buckley
a6a1a58dd8
Update documentation for gh api PATCH 2024-07-22 19:36:20 +01:00
Simon
0a3a12839d
Exit with 1 on authentication failure 2024-07-22 20:22:42 +02:00
Babak K. Shandiz
42da8baf70
Verify --milestone and --remove-milestone are not assignable at the same time
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-21 12:56:14 +01:00
Babak K. Shandiz
168a8832f0
Assert correct parsing of --remove-milestone option
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-21 12:55:47 +01:00
Babak K. Shandiz
683576d6bf
Add --remove-milestone option
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-21 12:54:23 +01:00
Babak K. Shandiz
9dabc3b8dd
Remove unused expected output from test case (with wantsErr: true)
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-21 12:53:15 +01:00
Babak K. Shandiz
17257df064
Verify --body and --body-file are not assignable at the same time
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-21 12:45:28 +01:00
Zach Steindler
a81a1f7e90
Remove attestation test that requires being online (#9340)
Signed-off-by: Zach Steindler <steiza@github.com>
2024-07-19 09:24:47 -04:00
Jesse Houwing
e0c03fc603
Remove redundant whitespace 2024-07-18 10:20:44 +02:00
Babak K. Shandiz
5b918cfdf0
Rename package directory and files
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-17 18:52:23 +01:00
Babak K. Shandiz
5b71586f39
Rename package name to update_branch
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-17 18:50:59 +01:00
Babak K. Shandiz
b584895ad8
Rename gh pr update to gh pr update-branch
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-17 18:50:39 +01:00
Babak K. Shandiz
989152e64f
Add test case for merge conflict error
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-16 17:33:59 +01:00
Babak K. Shandiz
5d2378dc1d
Handle merge conflict error
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-16 17:30:48 +01:00
Babak K. Shandiz
497a915a46
Return error if PR is not mergeable
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-16 15:54:59 +01:00
Babak K. Shandiz
28c72eb5b7
Replace literals with consts for Mergeable field values
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-16 15:29:11 +01:00
Babak K. Shandiz
1a6f59820e
Remove unused flag
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-16 15:05:43 +01:00
Babak K. Shandiz
171e8d33f8
Print message on stdout instead of stderr
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-16 15:02:22 +01:00