Commit graph

5008 commits

Author SHA1 Message Date
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
Babak K. Shandiz
2ce3279ebc
fix(run): add IsSkipped function
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-16 14:19:45 +01:00
Andy Feller
21202ff992 Improve comments from PR feedback 2025-07-16 08:47:12 -04:00
Andy Feller
1eeb797975
Revert "Fix: gh pr create prioritize --title and --body over --fill w…"
This reverts commit b31f38c946.
2025-07-14 17:23:09 -04:00
Andy Feller
29a94ab9b1 Reformat non-documentation hostnames
Outside of the hostnames previously fixed, I talked with @williammartin about what to do with the remaining references and the concern about the mixed format.

One suggestion for the error / test use case was to remove the extraneous text all together.
2025-07-14 08:43:15 -04:00
Andy Feller
313d20ba83 Ensure hostnames are visible in CLI website
This commit changes <github.com> and <ghe.com> references to `github.com` and `ghe.com` so they are visible on the GitHub CLI marketing website.

GitHub Pages will render URLs with a protocol as clickable links, however hostnames are treated as HTML elements and not rendered.
2025-07-14 08:33:20 -04:00
Andy Feller
fd1c31de59 Fix gh pr create tests from metadata change
These are the minimum fixes necessary to repair `gh pr create` tests after refactoring the underlying metadata resolution logic.
2025-07-11 15:32:17 -04:00
Josh Soref
4687f3312d
Improve api --preview docs
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-07-11 12:35:10 -04:00
Andy Feller
554fe0f51f Fix gh issue create tests, copilot web assign
This commit is primarily focused on fixing the existing `gh issue create` tests with the changes to the underlying queries retrieving the data for resolving metadata.

Additionally, a new test case for `gh issue create --web --assignee @copilot` was added to mirror existing tests.  While exercising this capability, I found out the web UI apparently wants `copilot` instead of the `copilot-swe-agent` login, so changes to address that were a part of this commit.
2025-07-11 12:19:36 -04:00
Andy Feller
a8053d19a9 Resolve issue and PR metadata consistently
This commit refactors how `gh issue create` and `gh pr create` retrieve information needed to resolve metadata to be more in line with the approach used in `gh issue edit` and `gh pr edit`.

Previously, both commands used `prshared.fillMetadata(...)` function to retrieve assignees, reviewers, labels, and teams outside of `api.RepoMetadata(..)`.  Now, these commands will consistently use the same logic and data for resolving metadata.
2025-07-11 10:21:17 -04:00
Brian DeHamer
c335c5e25f
include immutable field in release view
Signed-off-by: Brian DeHamer <bdehamer@github.com>
2025-07-10 11:46:09 -07:00
Sam Coe
f87451ff56
Simplify path qualifier building logic 2025-07-10 12:33:08 +02:00
Sam Coe
40b2c9f10c
Merge branch 'trunk' into fix-web-code-search-filename-extension-flags 2025-07-10 11:33:31 +02:00
ejahnGithub
d068696c4d add tenancy aware for san matcher 2025-07-09 15:55:41 -04:00
Andy Feller
49821b20f9 Add non-TTY issue create copilot test, todos 2025-07-08 15:19:09 -04:00
Kynan Ware
c93136b5f0
Merge pull request #11234 from cli/babakks/pr-merge-handle-404
Handle `HTTP 404` when deleting remote branch in `pr merge`
2025-07-08 07:02:11 -06:00
Babak K. Shandiz
e7f8bc89df
test(search): verify URL returns quoted query
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-07 15:45:32 +01:00
Babak K. Shandiz
d395172899
test(search): test pagination with multi-word quoted queries
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-07 15:44:56 +01:00
Babak K. Shandiz
81a1ce601c
fix(search): fix mutating query state fields
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-07 15:42:19 +01:00
Sam Coe
d28a2bdf47
Merge branch 'trunk' into fix-web-code-search-filename-extension-flags 2025-07-07 14:37:03 +02:00
Babak K. Shandiz
3e946a356c
test(pr merge): always assert stderr
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-05 15:02:41 +01:00
Babak K. Shandiz
b1e1c8d500
test(pr merge): verify deleteRemoteBranch behaviour when API returns error
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-05 14:54:33 +01:00
Babak K. Shandiz
bafefb345e
fix(pr merge): ignore 404 as error when deleting remote branch
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-05 14:54:28 +01:00
William Martin
7eef7af23d Reformat gh run view help 2025-07-04 17:25:59 +02:00
Babak K. Shandiz
0d8d330eb1
docs(run view): explain restrictions of fallback API calls
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-04 16:20:08 +01:00
Babak K. Shandiz
25ecbed620
test(run view): delete unused ZIP archive
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-04 14:13:08 +01:00
Babak K. Shandiz
53cf65e186
refactor(run view): remove Log field from DTO types
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-04 14:12:34 +01:00
Babak K. Shandiz
555b8f1bf9
test(run view): update tests
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-04 14:12:07 +01:00
Babak K. Shandiz
6d65904fee
refactor(run view): use API as fallback to fetch job logs
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-04 14:11:09 +01:00
Babak K. Shandiz
e0c7a328d2
test: add BinaryResponse helper function
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-04 14:09:09 +01:00
William Martin
502b64582d Support --no-repos-selected on secret set 2025-07-03 17:02:28 +02:00
Babak K. Shandiz
8ab5e84a12
test: add test for ParseURL
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-03 10:21:55 +01:00