Commit graph

444 commits

Author SHA1 Message Date
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
49821b20f9 Add non-TTY issue create copilot test, todos 2025-07-08 15:19:09 -04: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
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
Kynan Ware
ed4b90104f test(pr): Add tests for actor assignees 2025-06-03 14:30:19 +01:00
Andy Feller
cde860be88 Iterate on pr edit problems with existing assignees
This commit is a handful of changes around `gh pr edit --add-assignee` behavior.  Most notably, fixing a bug where the assigned actors weren't being dropped.

In addition to this, I was refactoring the testing setup to allow for individual test table scenarios could be contained.
2025-06-03 13:33:52 +01: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
3a8cdda148
Merge pull request #10991 from cli/kw/gh-cli-917-special-actor-assignee-names-noninteractive
`issue edit`, `pr edit`: Support special non-interactive (flags) assignee name `@copilot`
2025-05-16 12:19:43 -06: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
a22a1bbde4 test(editable): prompts use assignee display names 2025-05-16 09:20:58 -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
08cd1dc7db feat(issue edit): replacing actor assignee is done synchronously with updateIssue 2025-05-14 11:43:29 -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
29241cb7a5 refactor(issue edit): improve actor type handling
This improves actor type handling while fetching repository assignable actors.
2025-05-12 11:34:31 -06:00
Kynan Ware
e0afc91fef chore(issue edit): comments cleanup 2025-05-09 23:02:15 -06:00
Kynan Ware
0efdfed068 feat(issue edit): support assigning actors to issues 2025-05-09 22:56:09 -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
Azeem Sajid
ee281fd9ba
Add closedByPullRequestsReferences JSON field to issue view (#10941)
* [gh issue view] Expose `closedByPullRequestsReferences` JSON fields

* Incorporate GitHub Copilot review suggestions

* Incorporate review changes
2025-05-07 13:59:22 +01:00
Sinan Sonmez (Chaush)
0a1e7a1fdc
Add --delete-last option to pr comment and issue comment (#10596)
* deletion for issues with confirmation flag

* add handling for interaction case

* finish implementation for issues

* finish the implementation for issues

* finalize the implementation for PR

* fix missing --yes flag for PR

* address PR comments related to feedbacks

* improve CommentablePreRun for pre checks

* improve confirmation prompt and truncate long comment body

* address PR comments on tests

* Truncate comment for confirmation prompt

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

* Improve test case descriptions

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

* Fix mock comment body

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

* Remove irrelevant prompt stub

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

* Use `opts.Interactive` as TTY indicator

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

* Fix expected `Interactive` value

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

* Polish `TestNewCmdComment`

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-05-01 14:12:55 +01:00
William Martin
0aa49b7741 Feature detect v1 projects on issue edit 2025-04-17 21:19:41 +02:00
William Martin
c208b1f075 Feature detect v1 projects on web mode issue create 2025-04-17 21:04:08 +02:00
William Martin
c8dd61d837 Feature detect v1 projects on non-interactive issue create 2025-04-17 17:51:38 +02:00
William Martin
5ec2160bc6 Avoid requesting projectCards for issue view 2025-04-17 15:37:48 +02:00
William Martin
55d3b1eaa4 Document TestArgParsing 2025-04-17 15:33:44 +02:00
William Martin
cfa90a2c80 Remove old issue lookup funcs 2025-04-17 15:27:40 +02:00
William Martin
81ecbd8e1d Issue view early arg parsing 2025-04-17 15:27:40 +02:00
William Martin
e474acc2dd Issue comment early arg parsing 2025-04-17 15:27:40 +02:00
William Martin
455c77add8 Issue unpin early arg parsing 2025-04-17 15:27:39 +02:00
William Martin
f55138c896 Issue transfer early arg parsing 2025-04-17 15:27:39 +02:00
William Martin
5c67c1944b Issue reopen early arg parsing 2025-04-17 15:27:39 +02:00
William Martin
96699329fc Issue pin early arg parsing 2025-04-17 15:27:39 +02:00
William Martin
60f248458c Issue lock early arg parsing 2025-04-17 15:27:39 +02:00
William Martin
7744e0564f Issue develop early arg parsing 2025-04-17 15:27:39 +02:00
William Martin
6129b26f9f Issue delete early arg parsing 2025-04-17 15:27:39 +02:00
William Martin
8b615ec2e6 Issue close early arg parsing 2025-04-17 15:27:39 +02:00
William Martin
aaddcb019d Issue edit early arg parsing 2025-04-17 15:27:39 +02:00
Andy Feller
47225bcf56
Merge pull request #10737 from cli/andyfeller/muted-text-part2-github-cli-833
Ensure muted text is thematic and customizable
2025-04-08 16:59:36 -04:00
Andy Feller
918cafc222 Deprecate ColorScheme.Gray for ColorScheme.Muted
This commit converts all of the places using ColorScheme.Gray and ColorScheme.Grayf to Muted and Mutedf.

There is a little extra tidying up with local variable names or converting code to use Mutedf format.
2025-04-06 10:18:48 -04:00
Andy Feller
3eca268a7f Introduce color_labels support, update commands
This commit implements the actual changes around configuration setting / environment variable logic for displaying labels using their RGB hex color code in terminals with truecolor support.

One of the subtler changes in this commit is renaming generic ColorScheme.HexToRGB logic to render truecolor to ColorScheme.Label as this feature was being used exclusively for labels.  This is due to confusion about introducing the new `color_labels` config on top of generic coloring logic.
2025-04-02 18:24:20 -04:00
Andy Feller
bec527d49e Clean up pr/issue comment test names 2025-03-18 16:14:14 -04:00
Andy Feller
a47651df43 Bring issue/PR comment tests up to par, correct
This commit brings the `gh issue comment` and `gh pr comment` tests in line with one another while also addressing some corner cases that weren't previously tested.
2025-03-18 15:56:25 -04:00
Andy Feller
018b6d6d07 Initial pass fixing gh issue and gh pr comment
There is still a bit of work to get the gh pr comment tests in order, however this goes a way towards fixing the issue along with acceptance tests.

Also, it turns out some of the issue acceptance tests were really running `pr` tests.
2025-03-17 23:18:36 -04:00
Azeem Sajid
69fff52026
Inconsistent format of description of flags (starting with lowercase letter) (#10507) 2025-02-27 11:40:21 +01:00
latzskim
e516e5ed5d [gh issue/pr comment] Create a comment if no comment already 2025-02-12 21:04:22 +01:00