Commit graph

727 commits

Author SHA1 Message Date
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
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
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
Andy Feller
49821b20f9 Add non-TTY issue create copilot test, todos 2025-07-08 15:19:09 -04:00
Babak K. Shandiz
00a86a105e
fix: remove AssignedActorsUsed field
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-01 11:11:28 +01:00
William Martin
ee3db50e43 Avoid requesting PR reviewer twice 2025-06-11 15:54:16 +02:00
William Martin
793a7ff459 Fix pr edit when URL is provided 2025-06-02 15:07:55 +02:00
Kynan Ware
0788a01517 refactor(api): inline struct definitions in RepoAssignableActors 2025-05-16 15:17:39 -06:00
Kynan Ware
e0f3f0f2fd refactor(api): change CopilotActorLogin to constant 2025-05-16 14:57:49 -06:00
Kynan Ware
a28e2d8784 refactor(api): use constant for Copilot login 2025-05-16 12:28:46 -06:00
Kynan Ware
475163a126
Merge pull request #10990 from cli/kw/gh-cli-916-special-actor-assignee-names
`issue edit`, `pr edit`: handle display names in interactive assignee editing
2025-05-16 10:16:08 -06:00
Kynan Ware
8bd77c0a95 fix(pr edit): clarify error messages for assignee actors and users 2025-05-15 14:01:10 -06:00
Kynan Ware
981da86701 doc(pr edit): condense comment for reviewer/user filtering 2025-05-15 13:47:51 -06:00
Kynan Ware
51b1e6cd6f
Merge branch 'kw/gh-cli-909-911-assign-actors-to-prs' into kw/gh-cli-916-special-actor-assignee-names 2025-05-15 11:27:14 -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
d72018d312 feat(pr edit): fetch assignable actors 2025-05-15 09:33:36 -06:00
Kynan Ware
f559068106 feat(pr edit): fetch assigned actors 2025-05-15 09:33:36 -06:00
Kynan Ware
0db7ae872f refactor(api): remove needless parenthesis
Co-authored-by: Andy Feller <andyfeller@github.com>
2025-05-15 09:33:36 -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
d4832ba015 feat(pr edit): fetch assignable actors 2025-05-14 11:52:02 -06:00
Kynan Ware
71f22d8843 feat(pr edit): fetch assigned actors 2025-05-14 11:52:02 -06:00
Kynan Ware
712eeabd4a doc(api): remove needless comment 2025-05-14 08:55:55 -06:00
Kynan Ware
dfd600713f refactor(api): rename assignable user types and methods 2025-05-14 08:53:47 -06:00
Kynan Ware
1e5c3c7426 fix(issue edit): revert rename of ActorAssignees 2025-05-13 13:02:20 -06:00
Kynan Ware
261297f0a2 refactor(issue edit): add assignedActors to lookupFields 2025-05-13 07:28:42 -06:00
Kynan Ware
3bed77836a refactor(issue edit): rename loop variable for clarity 2025-05-13 07:11:24 -06:00
Kynan Ware
35792827ad refactor(issue edit): rename AssignedActors to ActorAssignees 2025-05-13 07:09:04 -06:00
Kynan Ware
cff2fa71e2 doc(repo queries): clarify reviewer actor fetching logic 2025-05-12 11:49:44 -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
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
William Martin
e995a873cb Feature detect v1 projects on non-interactive pr create 2025-05-02 15:08:34 +02: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
Azeem Sajid
9ed733fa5e
Add closingIssuesReferences JSON field to pr view (#10544)
* [gh pr view] Support `closingIssuesReferences` JSON field

* Support pagination

* Support pagination

* Fix typo

* Add more fields
2025-04-29 11:48:20 +01: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
beforetech
563c2f9e18 refactor: use a more straightforward return value
Signed-off-by: beforetech <mail@before.tech>
2025-02-23 22:59:33 +08:00
zhuhaicity
13211af256 chore: fix some function names in comment
Signed-off-by: zhuhaicity <zhuhai@52it.net>
2025-01-12 15:07:04 +08:00
Dalius Dobravolskas
9414930b5d
Adding option to return baseRefOid in pr view
You need to know exact `baseRefOid` so you could show correct diff.
`baseRefName` is not enough sometimes because branch from which PR was
forked might have changes already.

Example usage:
```
gh pr view --json headRefName,headRefOid,number,baseRefName,baseRefOid,reviewDecision
```
2024-11-19 23:50:45 +02:00
tsukasa inoue
b33e2f92a7
feat: add ArchivedAt field to Repository struct 2024-10-19 11:11:24 +09:00
Tyler McGoffin
81591a09b8 Use go-gh/auth package for IsEnterprise, IsTenancy, and NormalizeHostname 2024-10-15 11:56:43 -07:00
bagtoad
41f5209708 Fix api tests after function signature changes 2024-10-11 12:20:12 -06:00
bagtoad
291370824b Return nil instead of empty objects when err 2024-10-11 12:08:10 -06:00
bagtoad
4ecb125c7c Update function names
Licenses are no longer referred to as templates. Prefix the new license and gitignore functions with "Repo" as a more descriptive name.
2024-10-09 21:00:43 -06:00
Kynan Ware
8a1e6ac9f0
Apply suggestions from code review
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-10-08 14:00:30 -06:00
bagtoad
0f1320a0a0 Refactor tests and add new tests 2024-10-06 13:24:21 -06:00
bagtoad
3be44fb6e2 Move API calls to queries_repo.go 2024-10-06 11:51:16 -06:00
bagtoad
0bc0f8c8eb Implement license view 2024-09-29 19:09:46 -06:00