These changes enhance the existing `gh issue view` experience by listing v2 projects in interactive and non-interactive forms.
Additionally, the tests have been enhanced to use a more standard `httpStubs` approach from other tests.
Renamed the test to clarify its purpose and added an explicit exclusion for the OrganizationTeamList GraphQL query to ensure teams are only fetched when specified. This improves test accuracy and readability.
Introduces a TeamReviewers boolean to RepoMetadataInput to control whether team reviewers are fetched. Updates RepoMetadata logic to only fetch teams if both Reviewers and TeamReviewers are true. Adds tests to verify correct behavior when TeamReviewers is false.
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
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.
- 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.
* 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>
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
```