GitHub CLI 1.9.0
New Features
GitHub Actions in the CLI
Three new top-level commands have been added to gh:
gh runlists, views, and interacts with workflow runsgh workflowlists, views, runs, and toggles workflow filesgh actionsprints information about the integration betweenghand GitHub Actions
You can now get insight into what GitHub Actions is running across your repository with
$ gh run listand dig into specifics with
$ gh run view
$ gh run view --log
$ gh run view --log-failedRun gh actions to learn more and get started. There is also a video demo covering a bunch of the new commands.
This was a huge effort that brought in the entire CLI team as well as a lot of community input and feedback. We're excited for you to try it out!
Please let us know what you get up to with this new integration or if you have suggestions for our next iteration of support in our discussions thread.
Issue and pull request commands now support JSON export
Issue and pull request list, view, and status commands now support the --json option which enables the JSON output format suitable for scripts.
$ gh pr list --json number,title,mergeable,reviewRequests[
{
"mergeable": "MERGEABLE",
"number": 3419,
"reviewRequests": [
{
"__typename": "User",
"login": "vilmibm",
"name": ""
}
],
"title": "add Debian install variant without add-apt-repository"
},
...
]The --json flag accepts a comma-separated list of data fields to request from the GitHub server. Field names must always be specified to use this feature. To see the list of available fields, use the --json flag without a value.
Additionally, any command that accepts --json also supports the --jq and --template options that were previously available only in the gh api command. These options allow filtering down or transforming the resulting JSON into something more immediately usable by shell scripts. Refer to gh help formatting for more information.
Development and Documentation Updates
- Add tests for manual pages generation #3330
- Tweak build scripts to enable cross-compiling #3383
- Add note about current branch detection #3412 (thanks @cristiand391 !)