Commit graph

5001 commits

Author SHA1 Message Date
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
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
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
Sam Coe
545b420ff8
Transform extension and filename qualifiers into path qualifier 2025-07-03 07:43:35 +02:00
Andy Feller
c69f828019 Initial assign Copilot during issue create changes
- updated command documentation for new `--assignee @copilot` syntax
- updated `gh issue create` logic with feature detection for actor availability
- fixed bug where `--assignee` would not select default assignees due to login vs display name mismatch
- updated survey prompt logic to avoid parsing prompt options in favor of correlating with assignee / actor source

One thing that is not included in these changes is incorporating the GraphQL mutation to replace assignees with actors, which I will continue iterating on.
2025-07-02 16:22:12 -04:00
Babak K. Shandiz
b7fa5ea7a9
docs: explain PR URL parsing reason
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-01 11:41:07 +01:00
Babak K. Shandiz
dc51226ce2
test: improve test case to highlight host name override
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-01 11:21:24 +01:00
Babak K. Shandiz
58ed691a6c
test: remove references to AssignedActorsUsed field
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-01 11:19:13 +01:00
Babak K. Shandiz
2c86246a1a
test: verify providing a URL arg affects the base repo
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-01 11:18:38 +01:00
Babak K. Shandiz
b85dc94f84
refactor: select PR fields based on detected features
This change is almost a revert to what had already done in #10984.

Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-01 11:14:50 +01:00