Skip to content

gh pr edit --add-{reviewer,assignee} shouldn't need the organization.read scope #11920

@cprecioso

Description

@cprecioso

We have a GitHub workflow that updates a PR, tagging a new person (as both reviewer and assignee) when certain conditions are met.

This workflow is failing because we're calling gh pr edit $pr --add-reviewer $username --add-assignee $username, and it is trying to read team members, even when we're just passing it a username.

The underlying APIs do not need this scope (1, 2), so gh shouldn't either (or at least should handle it gracefully when it isn't available).

Our workaround is to just tag the user in a comment to the PR and skip assigning it to them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageneeds to be reviewed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions