-
Notifications
You must be signed in to change notification settings - Fork 8.2k
gh pr create: Reviewers automatically requested on draft #9589
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingmore-info-neededMore info needed from user/contributorMore info needed from user/contributorneeds-triageneeds to be reviewedneeds to be reviewed
Description
Describe the bug
In a repository with codeowners, if you use the gh pr create command to create a draft PR, the codeowners will automatically be assigned as reviewers.
When creating the same kind of draft PR in the GitHub UI, the reviewers aren't added until the PR is marked as Ready for review.
Steps to reproduce the behavior
- Create / find a repository with CODEOWNERS assigned to a team
- Create a commit for changing a file owned by that team
- Use
gh pr create --title test --body "test" --assignee "@me" --draftto create the PR as a draft - See that reviewers are automatically added at the
draftstage
Repeat with a PR created via the GitHub UI and the reviewers will not be assigned when you hit the Create Draft button.
Expected vs actual behavior
Drafts are created without reviewers automatically assigned.
Or optionally: a flag to decide whether to request reviewers automatically.
Logs
Not much to show, it succeeds in creating the PR without any error message etc.
gh pr create --title "${title}" --body "${description}" --assignee "@me" --base master --draft
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingmore-info-neededMore info needed from user/contributorMore info needed from user/contributorneeds-triageneeds to be reviewedneeds to be reviewed
Type
Fields
Give feedbackNo fields configured for issues without a type.