Skip to content

gh pr create shows PR author as option for reviewers when logged in with PAT #6436

Description

@cedricschwyter

Describe the bug

When creating a PR via gh pr create it seems the CLI allows to select oneself as a reviewer. I am not sure this should be the case, as GitHub generally does not allow this on pull requests. I am logged in with a PAT set in GITHUB_TOKEN env variable.

Steps to reproduce the behavior

  1. Simply create any PR with gh pr create
  2. Edit metadata
  3. Select author of the new PR as reviewer
  4. GitHub will not accept the author as a reviewer

Expected vs actual behavior

The CLI does not suggest the author of the new PR as a reviewer

Logs

CLI:

image

GitHub:

image

Activity

  1. changed the title [-]`gh pr create` shows PR author as option for reviewers[/-] [+]`gh pr create` shows PR author as option for reviewers when logged in with PAT[/+] on Oct 14, 2022
  2. added
    priority-3Affects a small number of users or is largely cosmetic
    and removed on Oct 17, 2022
  3. samcoe commented on Oct 17, 2022

    @samcoe
    Contributor

    @d3psi Thanks for writing in, I was able to reproduce this bug. We should not be allowing the selection of the current user from the reviewers selection list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedContributions welcomepriority-3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions