Add find-reviewer script, which finds the most suitable reviewers for the last commit
This commit is contained in:
parent
6cd7ae8513
commit
4a8910419b
|
@ -0,0 +1,12 @@
|
|||
function find-reviewer {
|
||||
git rev-parse --show-toplevel >/dev/null 2>&1 &&
|
||||
git log -1 --oneline --stat --name-only |
|
||||
sed -ne '2,$p' |
|
||||
while read FILE; do
|
||||
GIT_PAGER=cat git log --format='%ae' -- "$FILE";\
|
||||
done |
|
||||
sort |
|
||||
uniq -c |
|
||||
sort -nr ||
|
||||
echo "ERROR: '$PWD' is not a Git repository." >&2
|
||||
}
|
Loading…
Reference in New Issue