Skip to content

Instantly share code, notes, and snippets.

Last active Mar 30, 2022
What would you like to do?
GitHub - Get All Your PRs As JSON
#!/usr/bin/env bash
# Install GH CLI client
brew install gh
# Configure organisation and username variables
# Retrieve pull request JSON
# @see:
gh api --method GET /search/issues --raw-field q='is:pr user:$ORG author:$USER' --paginate | jq 'reduce inputs as $i (.; . += $i)' > PRs.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment