Commit graph

45 commits

Author SHA1 Message Date
Kynan Ware
ae5e857c2e refactor(featuredetection): rename ActorIsAssignable to ApiActorsSupported
Aligns the feature detector field name with the downstream
ApiActorsSupported flag introduced in the previous commit, so the
signal has one consistent name from detection through to consumption.

Also consolidates leftover TODO tags (actorIsAssignableCleanup,
requestReviewsByLoginCleanup) under the single // TODO ApiActorsSupported
tag so there's exactly one thing to grep for.

Pure rename with no logic changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 21:09:04 -06:00
Kynan Ware
3c00ffdade refactor(pr shared): consolidate ActorAssignees and ActorReviewers into ApiActorsSupported
The CLI had two per-entity flags (ActorAssignees on EditableAssignees and
IssueMetadataState, ActorReviewers on IssueMetadataState) threaded through
different layers of the stack to distinguish github.com from GHES. Both
flags were always set from the same source (issueFeatures.ActorIsAssignable)
and never had different values, but they were carried independently on
different structs. This led to a confusing asymmetry where:

- EditableAssignees had ActorAssignees but EditableReviewers had nothing
- The PR edit flow piggybacked on editable.Assignees.ActorAssignees to
  make reviewer mutation decisions, which was misleading
- RepoMetadataInput only had ActorAssignees with no reviewer equivalent

This commit replaces all per-entity flags with a single ApiActorsSupported
bool hoisted to the shared level on Editable, IssueMetadataState, and
RepoMetadataInput. Both assignees and reviewers now key off the same signal.

Every branch site is marked with // TODO ApiActorsSupported so we can grep
for cleanup sites when GHES eventually supports the actor-based mutations
(replaceActorsForAssignable, requestReviewsByLogin).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 21:04:41 -06:00
Kynan Ware
33783748f3 review: address code review feedback
- Fix tests: assert logins (not display names) in actorLogins
- Remove dead ReplaceActorsForAssignableByID (no callers)
- Extract shared AssigneeSearchFunc to pkg/cmd/pr/shared/editable.go
- Remove duplicate assigneeSearchFunc from pr/edit and issue/edit

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 17:36:52 -06:00
Kynan Ware
947f8fb1b7 refactor(issue edit): wire up search-based assignee selection
Add AssigneeSearchFunc to gh issue edit interactive flow, matching
the pattern already used in gh pr edit. This eliminates the bulk
RepositoryAssignableActors fetch for interactive assignee selection,
using dynamic SuggestedAssignableActors search instead.

Also clean up pr edit assigneeSearchFunc signature to remove the
unused editable parameter (no longer needed after removing the
actor accumulation hack).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 17:06:38 -06: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
Kynan Ware
e373ad6c9f Pass ProjectsV1Support to FetchOptions functions
Update FetchOptions and related function signatures to accept a ProjectsV1Support parameter, enabling conditional logic based on project support. This change improves flexibility for handling project fields in issue and PR editing flows.
2025-10-21 15:03:52 -06:00
Tim Rogers
9a8031151c
Document support for @copilot in gh [pr|issue] edit --add-assignee and --remove-assignee (#11056)
* Document support for `@copilot` in `gh [pr|issue] edit --add-assignee` and `--remove-assignee`

Following up on #10991, this updates the help text for
`issue edit` and `pr edit`'s `--add-assignee` and
`--remove-assignee` options to mention that you can use
`@copilot`.

This is already mentioned in the command-level help text, but
not at the argument level, whereas the `@me` macro is.

* Apply suggestion from @babakks

Co-authored-by: Babak K. Shandiz <babakks@github.com>

* Apply suggestion from @babakks

Co-authored-by: Babak K. Shandiz <babakks@github.com>

---------

Co-authored-by: Babak K. Shandiz <babakks@github.com>
2025-06-02 16:29:35 +01:00
Kynan Ware
748afb6e85 doc(issue/pr edit): clarify @copilot usage 2025-05-16 12:18:23 -06:00
Kynan Ware
532aa1c32a doc(issue/pr edit): doc @copilot assignee 2025-05-16 09:55:17 -06:00
Kynan Ware
9a5ea87d75 fix(issues): fix non-interactive assignee matching to logins&IDs 2025-05-15 09:56:35 -06:00
Kynan Ware
eace1e889a feat(editable): update assigned actors to use display names
- Refactored AssignedActors to return display names instead of logins.
- Updated related functions to ensure consistency in display names.
- Enhanced comments for clarity on display name logic and actor types.
2025-05-14 20:26:53 -06:00
Kynan Ware
1e5c3c7426 fix(issue edit): revert rename of ActorAssignees 2025-05-13 13:02:20 -06:00
Kynan Ware
21bd797c6c fix(issue edit): use double quotes for assignedActors 2025-05-13 11:45:40 -06:00
Kynan Ware
261297f0a2 refactor(issue edit): add assignedActors to lookupFields 2025-05-13 07:28:42 -06:00
Kynan Ware
35792827ad refactor(issue edit): rename AssignedActors to ActorAssignees 2025-05-13 07:09:04 -06:00
Kynan Ware
ee9d169204 feat(issue edit): fetch assignable actors 2025-05-09 15:13:11 -06:00
Kynan Ware
38e52db377 feat(issue edit): fetch currently assigned actors 2025-05-09 15:12:07 -06:00
William Martin
0aa49b7741 Feature detect v1 projects on issue edit 2025-04-17 21:19:41 +02:00
William Martin
aaddcb019d Issue edit early arg parsing 2025-04-17 15:27:39 +02:00
Tyler McGoffin
18d58b8d84
Replace --project.* flags' name with title in docs (#9443)
With the upcoming migration from v1 project to v2 projects, we'd like the
language in our documentation to align with v2 project language. In v2,
projects are referred to by `title` and not `name`, though they are
functionally equivalent under the hood for the CLI
2024-08-09 13:55:14 -07:00
Babak K. Shandiz
a73ae65ca8
Use closure-scoped variable to catch --remove-milestone option
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-29 21:40:24 +01:00
Babak K. Shandiz
4c8ec84e26
Improve --remove-milestone option description
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-28 15:23:19 +01:00
Babak K. Shandiz
6e34e81b76
Point to Editable.MilestoneId method
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-28 15:22:54 +01:00
Babak K. Shandiz
683576d6bf
Add --remove-milestone option
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-21 12:54:23 +01:00
Yukai Chou
b14da6c63f Wrap scopes 2023-11-23 07:22:57 +08:00
Yukai Chou
896101678f Wrap cli commands in backticks uniformly 2023-11-17 01:32:00 +08:00
Nate Smith
f04e3398ed use prompter in shared editable code 2023-08-17 11:28:01 -05:00
Heath Stewart
17679cf65f
Edit multiple issues, PRs in parallel (#7259)
Allows multiple issues or PRs to be edited in parallel, and querying for shared fields once to reduce network requests.

Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
2023-04-25 14:45:41 +02:00
Sam Coe
63ad804a26
Add notes about project scope to various commands (#6907) 2023-01-24 17:22:20 +00:00
Ilya Yatsishin
179e9c256d
Add projectsV2 support to issue create, issue edit, pr create, and pr edit (#6735)
Co-authored-by: pshevche <pavel.shevchenko.95@gmail.com>
Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
2023-01-19 22:13:09 +00:00
Mislav Marohnić
3cf3d6d2d4 Avoid overfetching in non-interactive issue edit 2021-11-23 21:10:37 +01:00
Mislav Marohnić
c8d5a6be02 Accept pull requests in issue edit argument 2021-11-23 20:39:19 +01:00
Alan Donovan
f4491c7a80 Add FlagErrorf; encapsulate FlagError.error 2021-10-21 11:40:20 -04:00
Reto Hablützel
f6e9734f17 add more hints to docs 2021-09-25 08:38:26 +02:00
Mislav Marohnić
e0fa56dc29 Merge remote-tracking branch 'origin' into go-module-v2 2021-09-02 20:02:16 +02:00
Luke
1102de89be add quotes around @me in documentation to ensure examples work on powershell 2021-08-30 09:13:43 -05:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Mislav Marohnić
42155c7d2d Export more IDs in issue/pr JSON payload 2021-05-18 18:19:28 +02:00
Cristian Dominguez
8bfe64d593 Accept --body-file flag if --body is supported 2021-03-15 15:12:41 +01:00
Sam Coe
4fdf28d8a4
Change behavior of slice flags for issue edit and pr edit commands 2021-02-12 14:42:21 -08:00
Sam Coe
a47ee660a7
Pr edit command 2021-02-12 10:08:44 -08:00
Sam Coe
cd9f211826
Remove unused code 2021-02-09 09:48:58 -08:00
Sam Coe
4ed94c2a06
Fix up flag descriptions 2021-02-08 09:59:30 -08:00
Sam Coe
68f71d82a0
Remove webmode 2021-02-08 09:17:04 -08:00
Sam Coe
b366802aa1
Edit issue command 2021-02-04 10:54:34 -08:00