Commit graph

3631 commits

Author SHA1 Message Date
Babak K. Shandiz
6dc729792d
Merge branch 'trunk' into 9299-improve-annotated-releases
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-08-10 21:55:41 +01:00
Babak K. Shandiz
668dbcefc6
Add test cases for PGP, SSH and X.509 signatures
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-08-10 21:50:31 +01:00
Babak K. Shandiz
b36b39df60
Explain why not looking for signature begin marker
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-08-10 21:29:22 +01:00
Yukai Chou
ac77d6750d Wrap flags with backticks, continued 2024-08-10 10:24:28 +08:00
Tyler McGoffin
18d58b8d84
Replace --project.* flags' name with title in docs (#9443)
With the upcoming migration from v1 project to v2 projects, we'd like the
language in our documentation to align with v2 project language. In v2,
projects are referred to by `title` and not `name`, though they are
functionally equivalent under the hood for the CLI
2024-08-09 13:55:14 -07:00
Andy Feller
dbcac5abc4
Merge pull request #9412 from sato11/docs-run-download-n
Document that `gh run download` downloads the latest artifact by default
2024-08-08 17:33:06 -04:00
Prabhat Kumar Sahu
ab34d868aa
Change gh repo set-default --view to print to stderr when no default exists (#9431)
Change logging of `gh repo set-default --view` to `stderr` when no default exists to better conform with expectations and unix standards.

---------

Signed-off-by: Prabhat <iprabhatdev@gmail.com>
2024-08-08 13:44:52 -07:00
Junichi Sato
330a385f9e
Document that gh run download downloads the latest artifact by default
This commit addresses the documentation issue.

The discussion at #7018 has confirmed that it is undocumented that
the current behavior of `gh run download` with `-n` and no `run-id`
downloads the latest artifact.

Although the behavior has not been created intentionally, it is the one
that should be documented and the future releases should warn before
a breaking change.
2024-08-08 19:35:16 +09:00
Andy Feller
000b2f95e0
Merge branch 'trunk' into tab-indents 2024-08-06 13:08:48 -04:00
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
Yukai Chou
d7b8ecf33d Unify use of tab indent in non-test source files
Found with
    rg '(^ | \t|\t )' -g '*.go' -g '!*_test.go'

Mixed indent exceptions:
- wrapped long list items with extra 2-space indent
- code snippets using space indent
- commented code lines having "\t*// \t+" prefix
2024-08-03 00:35:30 +08: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
8ea1b8973a
Update tests with changes to gitTagInfo function
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-30 00:21:19 +01:00
Babak K. Shandiz
46814b3759
Add example for --notes-from-tag
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-29 23:26:19 +01:00
Babak K. Shandiz
df3b0627fd
Add test for gitTagInfo
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-29 23:26:03 +01:00
Babak K. Shandiz
b9963809c2
Use signature-stripped tag annotation content
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-29 23:25:34 +01: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