Last active
April 22, 2021 14:09
-
-
Save dennisoelkers/baa2597565589d67928c23cf87dbd1d7 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
# Returning the status of all open PRs of $1, execute it in the directory of the git repository | |
# Perfect in combination with `watch -n 30 -c pr-check` | |
GITHUB_USER=dennisoelkers | |
if [ "$1" != "" ]; then | |
GITHUB_USER=$1 | |
fi | |
for i in `hub pr list -L 1000 -f "%au %i,%sH,%H,%n"|grep ${GITHUB_USER}|awk '{ print $2; }'`; do | |
HEAD_COMMIT=`echo $i | cut -d ',' -f 2` | |
PR_NUMBER=`echo $i | cut -d ',' -f 1` | |
BRANCH=`echo $i | cut -d ',' -f 3` | |
echo "\033[1;33m${BRANCH} (${PR_NUMBER}):\033[0m"; hub ci-status --color -v ${HEAD_COMMIT}; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment