Commit graph

5685 commits

Author SHA1 Message Date
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
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
Babak K. Shandiz
f65683784e
test: remove tests verifying assigne-related behaviour
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-01 11:12:58 +01:00
Babak K. Shandiz
12f4794151
fix: remove assignee-related intervention
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-01 11:12:16 +01:00
Babak K. Shandiz
23c9ff6d89
fix: expose ParseURL as a public func
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-01 10:49:18 +01:00
Andy Feller
e5913fe02f
Merge pull request #11038 from anuraaga/active-token-user
fix: get token for active user instead of blank if possible
2025-06-27 08:27:36 -04:00
Daniel Krzeminski
b31f38c946
Fix: gh pr create prioritize --title and --body over --fill when --web is present (#10547)
* fix: prioritize title and body over autofill for prs

* fix: prioritize title and body over autofill tests

* refactor: collapse state conditions

---------

Co-authored-by: Babak K. Shandiz <babakks@github.com>
2025-06-24 12:54:43 +00:00
Eugene
98d7135ccc
Merge branch 'trunk' into eugene/release-verify 2025-06-20 06:50:04 -07:00
ejahnGithub
169b909015 improve the description for gh release verify cmd 2025-06-19 10:18:23 -04:00
jinjingroad
28d5de9d8e chore: fix function name
Signed-off-by: jinjingroad <jinjingroad@sina.com>
2025-06-19 12:36:52 +08:00
Anuraag Agrawal
12a41333c3 Merge branch 'trunk' of https://github.com/cli/cli into active-token-user 2025-06-18 09:57:09 +09:00
Eugene
898bb42719
Merge branch 'trunk' into eugene/release-verify 2025-06-17 07:54:26 -07:00
William Martin
8deae3038a Use active token stubbing on auth config 2025-06-17 15:53:13 +02:00
William Martin
49ed6c4681 Use t.Chdir in tests 2025-06-17 11:44:14 +02:00
William Martin
da9ed6a336 Quote filenames suggested at the end of worklow run 2025-06-16 18:02:47 +02:00
Eugene
8d0161fa5d
Merge branch 'trunk' into eugene/release-verify 2025-06-16 08:49:58 -07:00
Dylan Ancel
1eee56ec00
Add accurate context when run rerun fails (#10774)
* Add accurate context when run rerun fails

* Update tests to verify behaviour for API errors

Signed-off-by: Babak K. Shandiz <babakks@github.com>

* Use the new `httpmock.JSONErrorResponse` helper

Signed-off-by: Babak K. Shandiz <babakks@github.com>

---------

Signed-off-by: Babak K. Shandiz <babakks@github.com>
Co-authored-by: Babak K. Shandiz <babakks@github.com>
2025-06-11 15:28:03 +01:00
William Martin
8baf5cc3e4
Merge pull request #11065 from cli/andyfeller/gh-pr-edit-assignees
Fix assignees being dropped from `gh pr edit`
2025-06-11 15:44:42 +02:00