Commit graph

5499 commits

Author SHA1 Message Date
William Martin
4dd50cf60c Fix project mutation query variable usage
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 07:13:07 -07:00
Babak K. Shandiz
4681b40e70
fix(agent-task/capi): fix capi API version
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2026-02-20 18:04:12 +00:00
William Martin
7ea88b1c4d
Bundle licenses at release time (#12625)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-02-18 17:59:27 +01:00
William Martin
ccfe693c46 Rename query for clarity 2026-02-18 17:34:42 +01:00
William Martin
f55656ca67 Remove pointer comments 2026-02-18 17:25:56 +01:00
William Martin
f8d855f502 Simplify error message 2026-02-18 17:25:56 +01:00
William Martin
aeeb8a3d93 Remove DTO concept 2026-02-18 17:25:56 +01:00
William Martin
8dcfd330e7
Add --query flag to project item-list (#12696)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Babak K. Shandiz <babakks@github.com>
2026-02-18 16:34:13 +01:00
Kynan Ware
8ed2fc913c Clarify --clobber flag deletes assets before re-uploading
Update the help text and flag description for `gh release upload --clobber`
to make it clear that existing assets are deleted before new ones are uploaded,
and that original assets will be lost if the upload fails.

Fixes #8822

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-17 18:11:57 -07:00
Babak K. Shandiz
027adc7bf5
Merge pull request #12695 from cli/babakks/retrieve-workflow-dispatch-run-id
feat(workflow run): retrieve workflow dispatch run details
2026-02-17 20:37:53 +00:00
Kynan Ware
3af535902d Add usage examples to gh gist edit command
Add a cobra Example string to the gist edit command showing common
operations: interactive selection, editing in default editor, editing a
specific file, replacing file content, adding/removing files, and
changing the description.

Closes #8943

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-17 12:38:15 -07:00
Babak K. Shandiz
31f3756089
fix(workflow run): bail out on feature detection error
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2026-02-17 11:48:25 +00:00
Babak K. Shandiz
ce016217d0
docs(workflow run): improve help docs
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2026-02-16 22:49:42 +00:00
Babak K. Shandiz
c47a10e583
docs(workflow run): add cleanup marker with explanation on future changes
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2026-02-16 22:02:18 +00:00
Babak K. Shandiz
36a85fd71f
fix(workflow run): apply url.PathEscape when compiling URL
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2026-02-16 21:55:25 +00:00
Babak K. Shandiz
3e9fbbb2fa
refactor(workflow run): remove temp out
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2026-02-16 21:53:17 +00:00
Kynan Ware
9de48154de Add missing TODO comments for featuredetection if-statements
Add greppable TODO identifiers above all if-statements that reference
featuredetection struct fields, as required by the featuredetection
linter. This ensures every feature detection branch is tagged for
future cleanup when GHES gains support.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-16 14:24:32 -07:00
Babak K. Shandiz
bf2ff7c39b
test(workflow run): verify retrieval of workflow run details
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2026-02-16 12:57:01 +00:00
Babak K. Shandiz
e73bf113dd
feat(workflow run): retrieve workflow run if supported by the API
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2026-02-16 12:56:01 +00:00
William Martin
166db75d36 pin REST API version to 2022-11-28
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-13 19:46:16 +01:00
William Martin
24964681a8 Respect --exit-status with --log and --log-failed
Fixes #12674
2026-02-13 16:04:06 +01:00
William Martin
2b5c3b5ecb document fork default branch behavior 2026-02-13 15:36:37 +01:00
William Martin
7448aed8ab fork default branch only in pr create 2026-02-12 16:56:14 +01:00
Kynan Ware
a9a0486c70 Clarify comment on reviewer API behavior
Update comment in FetchOptions to specify that the APIs used for both GHES and GitHub.com accept user logins and team slugs directly, clarifying why non-interactive flows with Add/Remove don't need to fetch reviewers/teams. Comment-only change; no functional modifications.
2026-01-30 11:33:22 -07:00
Kynan Ware
aac223ab71 Clarify assignee/reviewer fetching behavior
Add clarifying comment in pkg/cmd/pr/edit/edit.go to note that missing assignee/reviewer search functions trigger a downstream fallback to legacy fetching. In pkg/cmd/pr/shared/editable.go remove a redundant line and add a TODO urging migration of non-interactive assignee updates to use the new logins input with ReplaceActorsForAssignable to avoid unnecessary fetching. These are comment and doc changes to clarify intent and future improvements.
2026-01-30 11:29:11 -07:00
Kynan Ware
4569aae0e4 Clarify EditableReviewers comment
Remove a redundant struct-level comment and update the DefaultLogins field comment in pkg/cmd/pr/shared/editable.go to more accurately describe its purpose: used to disambiguate actors from display names rather than to compute add/remove sets.
2026-01-30 11:20:30 -07:00
Kynan Ware
d643d5386e fix(pr edit): send empty slices to clear reviewers in replace mode
Always send explicit lists for userLogins, botLogins, and teamSlugs
in RequestReviewsByLogin mutation, even when empty. Previously, empty
slices were omitted due to omitempty JSON behavior and len > 0 checks,
which prevented clearing all reviewers when using replace mode.

Empty slices are harmless no-ops in union mode, so we now send them
unconditionally for simpler logic.

Add test to verify the mutation receives empty slices when all
reviewers are removed.
2026-01-29 10:37:11 -07:00
Kynan Ware
846d6619b7 Remove redundant comment 2026-01-28 10:50:54 -07:00
Kynan Ware
738b82ddab Add CCR and reviewer MultiSelectWithSearch
Enables Copilot to be requested as a pull request reviewer, supporting both interactive and non-interactive flows. Introduces new reviewer search functionality, updates reviewer partitioning to distinguish users, bots, and teams, and adds a GraphQL mutation for reviewer management on github.com. Updates help text, tests, and internal APIs to support Copilot reviewer login and display names, while maintaining compatibility with GitHub Enterprise Server.
2026-01-27 23:11:51 -07:00
Kynan Ware
968a912a07 Remove outdated TODO comments in survey.go
Cleaned up obsolete TODO comments related to assignee and reviewer selection logic in the MetadataSurvey function.
2026-01-26 15:05:18 -07:00
Kynan Ware
a8053d6e93 Remove redundant comment in editRun test 2026-01-26 14:56:50 -07:00
Kynan Ware
28e07666f8 Return total assignee count in SuggestedAssignableActors
Updated SuggestedAssignableActors to return the total count of available assignees in the repository. Modified assigneeSearchFunc to use this count to calculate and display the number of additional assignees beyond the current results.
2026-01-26 14:33:45 -07:00
Kynan Ware
fb031b2b43 Add test for legacy assignee flow on GHES
Introduces a test case to verify that the interactive edit flow on GitHub Enterprise Server uses the legacy assignee selection without search, ensuring correct behavior when editing pull request assignees.
2026-01-26 13:48:23 -07:00
Kynan Ware
e3a3a01f2d Add comments to assigneeSearchFunc for clarity
Added detailed comments to the assigneeSearchFunc explaining its purpose and the importance of updating assignable actors metadata for later ID resolution when mutating assignees with the GraphQL API.
2026-01-26 13:29:22 -07:00
Kynan Ware
30cfbd9fdd Apply suggestions from code review
Co-authored-by: Babak K. Shandiz <babakks@github.com>
2026-01-26 13:29:22 -07:00
Kynan Ware
c0df49043f Clarify TODO comment for reviewer search function
Updated the TODO comment to specify wiring up the reviewer search function if or when it exists, providing clearer intent for future development.
2026-01-26 13:29:22 -07:00
Kynan Ware
ad8c770013 Only support assignee searchfunc on GitHub.com 2026-01-26 13:29:22 -07:00
Kynan Ware
07dfdf97ae Update edit tests
Updated test mocks and logic to consistently use lowercase 'monalisa' for login names and display names for user assignees. Improved handling of dynamic assignee fetching in interactive flows by relying on searchFunc and metadata population, and clarified logic in FetchOptions to fetch assignees only when necessary. These changes ensure more accurate simulation of interactive assignment and better test coverage for actor assignee features.
2026-01-26 13:29:22 -07:00
Kynan Ware
d46f42a752 Refactor MultiSelectWithSearch to use result struct
Refactored the MultiSelectWithSearch function and related interfaces to use a MultiSelectSearchResult struct instead of multiple return values. This change improves clarity and extensibility of the search function signature, and updates all usages, mocks, and tests accordingly.
2026-01-26 13:29:22 -07:00
Kynan Ware
7e7f8c6f6e Pass editable to assigneeSearchFunc and update metadata
The assigneeSearchFunc now receives the editable struct to update its Metadata.AssignableActors field with suggested assignable actors. This change ensures that the editable struct has the necessary actor metadata for later PR updates.
2026-01-26 13:29:22 -07:00
Kynan Ware
d04317c273 Add dynamic assignee search to PR edit flow
Introduces SuggestedAssignableActors API query and wires up a dynamic assignee search function in the PR edit command. Updates Editable and EditPrompter interfaces to support search-based multi-select for assignees, improving the user experience when assigning users to pull requests.
2026-01-26 13:29:22 -07:00
Kynan Ware
0beb74bf72 MultiSelectWithSearch initial implementation
Initial implementation of MultiSelectWithSearch:

- Implement by survey and accessible prompters. They use the same internal func under the hood.
- Implement in `gh preview prompter` for initial testing and demonstration
- Implement interface changes across the codebase and mocks to satisfy compiler.
- Implement tests for new MultiSelectWithSearch prompter
2026-01-26 13:29:22 -07:00
Kynan Ware
be1e21095c prshared: named prompt interface parameters
Updated the Prompt interface in survey.go to include parameter names for all methods, improving code readability and clarity.
2026-01-26 13:29:22 -07:00
Babak K. Shandiz
0d8a697c7c
fix(pr/shared): improve ParseFullReference error message
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2026-01-21 23:30:43 +00:00
Mikel Olasagasti Uranga
bd0177b039 Fix fmt.Errorf format argument in ParseFullReference
The error path passed an int to fmt.Errorf with %q, which expects a
string. Use the original reference string to avoid a format mismatch.

Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
2026-01-21 23:14:59 +01:00
Kynan Ware
49f72234ac
Merge pull request #12376 from majiayu000/fix-11903-pr-create-same-ref
fix: error when head and base refs are identical in pr create
2026-01-21 10:21:14 -07:00
majiayu000
0f4b9b0d91
refactor: address review comments
Signed-off-by: majiayu000 <1835304752@qq.com>
2026-01-21 18:28:21 +08:00
Kynan Ware
3e8855f755
Merge pull request #12101 from davidspek/feat/delete-all-cache-ref
feat(cache delete): allow for delete all caches for a ref
2026-01-20 12:16:47 -07:00
Kynan Ware
c4fd102016
Merge branch 'trunk' into fix-11903-pr-create-same-ref 2026-01-20 10:33:17 -07:00
Babak K. Shandiz
da5e5ac6d4
test(copilot): fix windows asset URL
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2026-01-20 10:33:19 +00:00