Skip to content

GitHub CLI 1.9.0

Choose a tag to compare

@github-actions github-actions released this 14 Apr 21:09
· 7455 commits to trunk since this release
31cccb4

New Features

GitHub Actions in the CLI

Three new top-level commands have been added to gh:

  • gh run lists, views, and interacts with workflow runs
  • gh workflow lists, views, runs, and toggles workflow files
  • gh actions prints information about the integration between gh and GitHub Actions

You can now get insight into what GitHub Actions is running across your repository with

$ gh run list

and dig into specifics with

$ gh run view
$ gh run view --log
$ gh run view --log-failed

Run 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 !)