Last active
March 13, 2022 21:52
-
-
Save jannfis/c659d6e704fa80fa3215070f885e10c4 to your computer and use it in GitHub Desktop.
Find all contributors for a given range of commits
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/sh | |
set -e | |
set -o pipefail | |
REVRANGE="$1" | |
if test "$REVRANGE" = ""; then | |
echo "USAGE: $0 <revrange>" >&2 | |
exit 1 | |
fi | |
for commit in $(git log ${REVRANGE} --oneline | awk '{print $1}'); do | |
gh pr list --state merged --search "$commit" --json author --template '{{range .}}{{printf "@%s\n" .author.login}}{{end}}' | |
done | sort | uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment