Skip to content

Instantly share code, notes, and snippets.

@kidbrax
Created January 26, 2018 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kidbrax/05ea8a89f33e331cbc940d2f4e4912dc to your computer and use it in GitHub Desktop.
Save kidbrax/05ea8a89f33e331cbc940d2f4e4912dc to your computer and use it in GitHub Desktop.
useful commands for getting info from Github using their API
# get all private repos whose default branch is master (note pagination)
curl -H "Authorization: token <auth-token>" \
https://api.github.com/orgs/arthrex/repos?type=private \
| jq '.[] | select(.default_branch | contains("master")) | .name, .default_branch'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment