Skip to content

Instantly share code, notes, and snippets.

@0bserver07
Created March 1, 2019 00:26
Show Gist options
  • Save 0bserver07/57dd6a9a358f34a874452bdb98d6a1b8 to your computer and use it in GitHub Desktop.
Save 0bserver07/57dd6a9a358f34a874452bdb98d6a1b8 to your computer and use it in GitHub Desktop.
git ls-remote origin 'pull/*/head' | awk '{print $2}' |
while read ref; do
pr=$(echo $ref | cut -d/ -f3)
git fetch origin $ref > /dev/null
files_changed=$(git show --pretty=format:'' --name-only FETCH_HEAD|wc -l)
author_files_changed=$(git log --pretty=format:"%an" -1)
echo "PR number $pr has changes in $files_changed files by $author_files_changed"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment