Skip to content

Instantly share code, notes, and snippets.



Last active Jan 28, 2019
What would you like to do?
Use Github API to make daily Github administration routines much easier! (especially if you/your company has a lot of repositories)

You need ( and JQ ( to use these snippets.

  • Delete a collaborator from all of your repositories (e.g. in case a developer left the company) -j list_repos | jq -r -c '.[] | "\(.full_name)"' | xargs -I % sh -c './ -y delete_collaborator % [USERNAME]'
  • List all the collaborators for all of your repositories (e.g. to double-check all the repo accesses are legitimate) -j list_repos | jq -r -c '.[] | "\(.full_name)"' | xargs -I % sh -c './ list_collaborators %' 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment