Last active
August 29, 2015 14:01
-
-
Save tedgrubb/4a4052ed6fe9129e4667 to your computer and use it in GitHub Desktop.
Bash script to recommend a code reviewer based on the files you changed.
This file contains hidden or 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
function 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