Last active
March 9, 2021 12:13
-
-
Save frane/d960c924f48b12fce63d8f525d4b9971 to your computer and use it in GitHub Desktop.
GitHub CLI command (alias) to list recent GitHub Action jobs.
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
# install gh (https://cli.github.com), install jq (https://stedolan.github.io/jq/), then run | |
gh alias set --shell jobs "gh api /repos/:owner/:repo/actions/runs | jq '(\"Name\" + \" \" * 20)[:20] + \" | \" + (\"Commit\" + \" \" * 50)[:50] + \" | \" + (\"Status\" + \" \" * 20)[:10] + \" | Time \", (.workflow_runs[] | (.name + \" \" * 20)[:20] + \" | \" + (.head_commit.message + \" \" * 100)[:50] + \" | \" + (.status + \" \" * 20)[:10] + \" | \" + .updated_at)' | sed 's/\"//g'" | |
# in a GitHub repo run | |
gh jobs | |
# to se the most recent jobs and statuses |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment