Commit graph

5039 commits

Author SHA1 Message Date
Lucas
bfb1354e51
test(cache): add tests for --ref flag in cache deletion
* Implemented test cases for handling the `--ref` flag in cache deletion commands.
* Added validation for using `--ref` with cache key and ID.
* Ensured proper error messages are returned for invalid usage of `--ref`.
2025-08-27 04:56:48 +02:00
Lucas
aff2bfaa5c
feat(cache): add support for --ref flag in cache deletion
- Introduced `--ref` flag to narrow down cache deletion to a specific branch or PR reference.
- Updated command examples to include usage of `--ref`.
- Added validation to ensure `--ref` cannot be used with `--all` and must accompany a cache key/ID.
2025-08-27 04:56:46 +02:00
minxinyi
21b08bdd20
refactor: use slices.Equal to simplify code (#11364)
Signed-off-by: minxinyi <minxinyi6@outlook.com>
2025-08-26 15:29:19 -06:00
Andrey
4e1318eb2a
feat: gh auth Automatically copy one-time OAuth code to clipboard (#11518)
* feat: add ability to copy one-time OAuth code while authenticating

Signed-off-by: Andrey <andrekabatareika@gmail.com>

* fix(docs): wrong example for gh auth refresh

* chore(authflow): update message to include one-time code to it

Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>

* chore(authflow): improve message when copied one-time code

Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>

* chore(authflow): don't early return error when could not copy OAuth code

Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>

* refactor(authflow): make code for working with OAuth code more readable

* Adjust language in `gh auth` help for clipboard

---------

Signed-off-by: Andrey <andrekabatareika@gmail.com>
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2025-08-25 09:52:51 -06:00
Andrey
204536cdd0
docs(release create): difference --generate-notes and --notes-from-tag (#11534)
* docs(release create): distinguish difference between '--generate-notes' and '--notes-from-tag'

Signed-off-by: Andrey <andrekabatareika@gmail.com>

* Clarify release notes behavior for unannotated tags

Updated help text to specify that if a git tag is not annotated, the release notes will use the commit message instead of the tag annotation.

---------

Signed-off-by: Andrey <andrekabatareika@gmail.com>
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2025-08-25 15:20:21 +00:00
Andrey
89512590ad
Add --force flag to gh run cancel (#11513)
* feat: add --force flag to run cancel command

Signed-off-by: Andrey <andrekabatareika@gmail.com>

* docs: use less prescriptive docs for --force flag

Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>

* chore: remove short flag

Signed-off-by: Andrey <andrekabatareika@gmail.com>

---------

Signed-off-by: Andrey <andrekabatareika@gmail.com>
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2025-08-21 12:45:12 -06:00
Copilot
5eddf8d523
Merge pull request #11536 from cli/copilot/fix-11535
Fix `gh repo delete --yes` safety issue when no repository argument provided
2025-08-20 11:03:44 -06:00
Andy Feller
9ae764b9fa
Merge pull request #11514 from cli/github-cli-937-v1-project-ghes-deprecation
Ensure users can see v2 projects when viewing issues and PRs, avoid v1 projects on GHES 3.17 and newer
2025-08-18 16:15:54 -04:00
Eugene
5ae174b6b3
Merge pull request #11511 from cli/eugene/trusted_root_flag_for_release_verify
Hidden trusted root flag for release verify
2025-08-15 16:58:19 -04:00
Eugene
7316ddc57d
Update pkg/cmd/release/verify/verify.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-14 16:08:44 -04:00
Eugene
e23c9d087d
Update pkg/cmd/release/verify-asset/verify_asset.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-14 16:08:37 -04:00
ejahnGithub
79888378d8 Hidden trusted root flag for release verify 2025-08-14 14:00:55 -04:00
ejahnGithub
c4d14044c7 udpate the test 2025-08-13 14:42:50 -04:00
ejahnGithub
2d9cf84690 replace /git/refs/tags/ to /git/ref/tags/ 2025-08-13 11:23:06 -04:00
Andy Feller
746da6de00 Update PR tests for v2 projects 2025-08-12 21:13:18 -04:00
Andy Feller
72f5fbbec0 Base changes for PR project items 2025-08-12 20:59:50 -04:00
Andy Feller
7851c9c664 Update gh issue view to show v2 projects
These changes enhance the existing `gh issue view` experience by listing v2 projects in interactive and non-interactive forms.

Additionally, the tests have been enhanced to use a more standard `httpStubs` approach from other tests.
2025-08-12 16:18:45 -04:00
ejahnGithub
ec086af25c add test for FetchRefSHA 2025-08-08 17:32:30 -04:00
Eugene
82eb05bb24
Merge branch 'trunk' into eugene/fetch-ref-handle-ReleaseNotFound 2025-08-08 13:29:04 -04:00
Kynan Ware
b5a6913a17
Merge branch 'trunk' into 10480-enhance-gh-search-docs 2025-08-06 10:34:25 -06:00
Kynan Ware
4dde0871bd Fix linter 2025-08-06 10:32:46 -06:00
Kynan Ware
3d9bd69e11
Update pkg/cmd/search/search.go 2025-08-06 10:28:56 -06:00
ejahnGithub
1beb8252a7 fix error for ErrReleaseNotFound when fetching ref 2025-08-04 20:58:45 -04:00
Sukh
6e400eb4a1 docs(search): move search syntax note to gh search --help 2025-08-02 03:01:40 -04:00
Andy Feller
bbc3d02cb3 Refactor tab completion test
This commit moves the `gh pr create` tab completion test closer to the logic rather than the commands that use it.

This should ensure that any command or flag that lists reviewers will present teams and users as expected.
2025-07-30 09:25:33 -04:00
Andy Feller
c9bc185209 Test gh pr create --reviewer tab completion 2025-07-30 09:16:44 -04:00
Andy Feller
8f20f0ab53 Include org teams for PR reviewers
This commit enhances the following scenarios to include organization teams as pull request reviewers:

1. Interactive `gh pr create` during additional metadata
2. Tab completing `gh pr create --reviewer`
3. Tab completing `gh pr edit --add-reviewer`
4. Tab completing `gh pr edit --remove-reviewer`

Additionally, a new `gh pr create` test case for ensuring that teams show up within interactive prompts has been added.
2025-07-29 18:19:22 -04:00
Sukh
73f6acc709 docs(help): rename search-syntax help topic 2025-07-25 19:56:39 -04:00
Sukh
dd0a0b3045 docs(search): add reference to gh help search 2025-07-25 19:55:23 -04:00
Kynan Ware
254119e498 Add help topic for search syntax in gh commands
Introduces a new help topic explaining how to use exclusion qualifiers in GitHub search syntax with gh commands, including platform-specific instructions for Unix-like systems and PowerShell. Provides links to relevant documentation for further reference.

Co-Authored-By: Sid <41968447+sukhpreet-s@users.noreply.github.com>
2025-07-25 17:23:45 -06:00
Sukh
45876eddc2 docs(search): add note for exclusion search syntax 2025-07-25 17:03:33 -04:00
Andy Feller
0d80c36dcc
Merge pull request #11361 from cli/kw/cli-11360-regression-gh-pr-create-fails-on-self-hosted-runner-in-v2760-resource-not-accessible-by-integration-organizationteams
Fix: `gh pr create`, only fetch teams when reviewers contain a team
2025-07-23 13:09:34 -04:00
Kynan Ware
5a6cac3643 Add tests for reviewer team handling in PR creation
Added test cases to verify that teams are fetched when reviewers include teams and not fetched when only users are specified. This ensures correct behavior when requesting reviews from users and teams during pull request creation.
2025-07-23 10:15:30 -06:00
William Martin
43e76099a5
Merge pull request #11274 from jsoref/issue-11239
Improve `api` `--preview` docs
2025-07-23 10:42:13 +02:00
Kynan Ware
df317d4a05 FIX: conditionally fetching team reviewers
Updated the logic for fetching team reviewers in PR edit and create flows. In `pr edit`, team reviewers are always fetched for consistency with existing behavior, with a note to potentially align with `pr create` logic in the future. In `pr create`, team reviewers are now only fetched if a reviewer contains a slash, aligning with behavior before the regression.
2025-07-22 11:00:47 -06:00
Eugene
806ae030ce
Merge pull request #11261 from cli/attester/tenancy-aware-for-san 2025-07-17 17:17:31 -04:00
Kynan Ware
5ea34d80de
Merge pull request #11211 from samcoe/fix-web-code-search-filename-extension-flags
Transform `extension` and `filename` qualifiers into `path` qualifier for web code search
2025-07-17 12:09:58 -06:00
Kynan Ware
7f97bcfcd6
doc: remove codenames from code comments 2025-07-17 12:00:17 -06:00
Kynan Ware
73cb3ec8a8
Merge pull request #11312 from cli/babakks/avoid-fetching-logs-for-skipped-jobs
Avoid fetching logs for skipped jobs
2025-07-17 09:48:41 -06:00
Sam Coe
e2b444452d
Add additional test case for when extension is prefixed with a dot 2025-07-17 17:32:48 +02:00
Andy Feller
47f24b9228
Merge pull request #11251 from cli/bdehamer/immutable-release-field
Display immutable field in `release view` command
2025-07-17 10:53:04 -04:00
Sam Coe
723d0e861b
Merge branch 'trunk' into fix-web-code-search-filename-extension-flags 2025-07-17 10:21:46 +02:00
Andy Feller
260519dc69
Merge pull request #11279 from cli/andyfeller/issue-create-assign-copilot
Assign Copilot during `gh issue create`
2025-07-16 17:01:32 -04:00
Andy Feller
973718712a Fix failing tests for Copilot replacement 2025-07-16 15:36:53 -04:00
Andy Feller
b433792a44 Fix copilot replace test names
In refactoring how this parameter works, I forgot to update the related tests to match.
2025-07-16 15:09:13 -04:00
Andy Feller
5cf3d3b9a5 Use constant for Copilot name
Based on PR feedback from @bagtoad, this commit creates a new constant for the Copilot bot name, which is used in the assignee / reviewer selection as well as replacing `@copilot` when going to GitHub.com UI
2025-07-16 15:06:43 -04:00
Andy Feller
4f0a5807bf Refactor CopilotReplacer logic based on PR feedback
Thanks to @bagtoad, this commit refactors the argument to `NewCopilotReplacer(bool)` from being where this is used to what it effect is has.

Because there is already precedence for display name being `<login> (<name>)`, I worried there would be confusion for `Copilot (AI)` being display name for assignees and reviewers but `Copilot` when going to GitHub.com UI.  Instead, I renamed the argument based on whether the login is returned / replaced.
2025-07-16 14:42:11 -04:00
Andy Feller
e2bed653df Implement actor and user assignee tests 2025-07-16 14:10:26 -04:00
Babak K. Shandiz
f67bd9a7d1
test(run view): assert a skipped job does not cause error
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-16 14:19:57 +01:00
Babak K. Shandiz
64d5d6c6c8
fix(run view): avoid looking for job log if its been skipped
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-16 14:19:56 +01:00