Last active
August 29, 2015 14:19
-
-
Save bcaudan/fa9b03bd93094620ece6 to your computer and use it in GitHub Desktop.
Push and send commits to Review Board. Install: add it in your path. Usage: git prv
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
#!/usr/bin/env bash | |
readonly CURRENT_BRANCH=$(git symbolic-ref HEAD | sed -e "s/^refs\/heads\///") | |
readonly COMMIT_REFS=($(git rev-list origin/$CURRENT_BRANCH..$CURRENT_BRANCH)) | |
readonly GROUPS="Frontend" | |
post_reviews() { | |
for (( idx=${#COMMIT_REFS[@]}-1 ; idx>=0 ; idx-- )) ; do | |
rbt post -p --target-groups=${GROUPS} ${COMMIT_REFS[idx]} | |
done | |
} | |
main() { | |
git push | |
post_reviews | |
} | |
main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment