Created
May 22, 2014 21:01
-
-
Save tedgrubb/6ac336046f3abecf3f07 to your computer and use it in GitHub Desktop.
Find authors to assign a pull request based on the files you've changed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Setup: | |
# Add this file to your $PATH | |
# Usage: | |
# git assign | |
changed_files=$(git diff --name-only HEAD master) | |
authors=$(echo "$changed_files" | xargs -L1 git log --follow | grep Author:) | |
printf "Authors in order of commits made to these files:\n\n" | |
printf "$changed_files\n\n" | |
printf "$authors" | sort | uniq -c | sort -r | sed 's/Author:/Commits:/g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment