Skip to content

Instantly share code, notes, and snippets.

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 NeilRobbins/92e6d2e1eabd149f62205f347c2d3da7 to your computer and use it in GitHub Desktop.
Save NeilRobbins/92e6d2e1eabd149f62205f347c2d3da7 to your computer and use it in GitHub Desktop.
Get and examine git organisation repos
ORG=PUT_THE_ORG_NAME_HERE;PAGE=1;ACCESS_TOKEN=PUT_THE_TOKEN_HERE; curl "https://api.github.com/orgs/$ORG/repos?page=$PAGE&per_page=100&access_token=$ACCESS_TOKEN" | grep -e 'git_url*' | cut -d \" -f 4 | xargs -l1 git clone
find . -type d -maxdepth 1 -exec sh -c 'cd -P "$0" && git log --no-merges --pretty=format:$0,%aN,%ai >> ../aggregatedLog.csv' {} \;
find . -type d -depth 1 -exec sh -c 'cd -P "$0" && git pull origin master' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment