Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tazarov/2b53530cea35c4f59afa4da523691543 to your computer and use it in GitHub Desktop.
Save tazarov/2b53530cea35c4f59afa4da523691543 to your computer and use it in GitHub Desktop.

This is a one-liner command to list and add a user as a reviewer to all pull requests in a github repo.

for pr in $(gh pr list --json number -q '.[].number'); do gh pr edit $pr --add-reviewer <user_id>; done

Note: The above works only in bash

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