Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

List All GitHub Pull Request Reviewers for a Repo

Needs jq installed.

#!/bin/bash

for pull_number in {1..500}
do
  USER="YourGitHubUserName"
  ORG="facebook"
  REPO="react"
  AUTH="$USER:$ENV_VAR_WITH_YOUR_GITHUB_PERSONAL_ACCESS_TOKEN"
  curl --silent -u $AUTH "https://api.github.com/repos/$ORG/$REPO/pulls/$pull_number/reviews" | jq -c '{ users: [.[].user.login] | unique }'
done
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment