Last active
March 25, 2019 20:03
-
-
Save jbenden/9a885d40321126f2786a5d8724ecc364 to your computer and use it in GitHub Desktop.
Show GitHub project's status checks via shell/terminal
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 | |
REPO=$(git config hub.upstream || echo aircrack-ng/aircrack-ng) | |
SHA=$(git rev-parse ${1:-HEAD}) | |
curl -sRL "https://api.github.com/repos/${REPO}/commits/${SHA}/status" | \ | |
jq -c -r ".statuses | .[] | [(.state, .context)] | @tsv" | \ | |
awk '/^failure/ { sub("failure", "\033[31mfailure\033[m") } /^success/ { sub("success", "\033[32msuccess\033[m") } { print($0) }' | \ | |
sort -k 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment