Releases: cli/cli
GitHub CLI 1.6.0
This is a large release seeing a few major new features and a slew of fixes. In January we spent a week cleaning out the backlog of community pull requests -- thank you for your patience as we got all that merged!
New Commands
Edit Issues and Pull Requests
gh issue edit and gh pr edit allow you to modify existing issues and pull requests. Both versions accept arguments to edit non-interactively and running without flags allows you to interactively edit. (#2915, #2940, #2949)
SSH Key Management
gh ssh-key list and gh ssh-key add are now live! You'll be prompted to refresh your auth token with increased scopes to use them. (#2990)
Issue Deletion
Issues can now be permanently deleted with gh issue delete (#2839)
New Features
PR Auto-Merge Support
pr merge now supports --auto. Instead of merging the pull request right away, the pull request will be automatically met once all requirements are met (#2980)
SSH Key Generation During Authentication
While running through the gh auth login flow, gh can now generate and upload SSH keys to GitHub on your behalf (#2892)
@me Syntax for Self Assigning Issues
When using gh issue create, the string @me can be used to self assign (#2004)
pr checkout Improvements
pr checkout now supports --force to force a checkout (#1953) and --detach to checkout a pull request in a detached head state (#2117)
And More
repo fork: support git flags (#2282)pr merge: edit commit body when merging (#2980, #2810)pr merge: alert about unpushed commits (#2255)gist view:--fileslists filenames in a gist (#2898)- Configuration path can now come from environment (#2444)
- Display upgrade notice for brew users (#2929)
- Show whether or not branches are up to date with the default branch in
gh pr status(#2952, #2988) - Show progress while creating a new pull request (#2808)
Fixes
- Minimized comments no longer appear in comment lists (#2859)
- Issue
and Pull Requesttemplates are now listed as per the API and not local file system (#2539) - Gist description dropped from single file raw view (#2888)
- Restore fork rename behavior (#2825)
- Clarify handling of git tags during release create (#2910)
- Explain how to link an issue in pr create (#2909)
- Improve repo create docs (#2908)
- Add more examples to api docs (#2951)
- Only fetch default branch when adding upstream remote (#2588)
- Consistently use success icon (#2799)
write:orgscope is now recognized as satisfyingread:org(#2965)pr merge: do not show invalid merge methods (#2224)pr merge: avoid prompting to enter editor after editing phase is chosen (#2989)repo create: clarify prompt (#2962)gist: print friendly error when missing required argument (#2664)auth status: add fail message for non-existent hostname (#2785)config: refactor to use os.UserHomeDir() (#2740)issue createandpr create: project argument works alongside--webnow (#2108)secret set: fix secret set --repos for repositories that have dashes #2844
Development Changes
createrepois now run via docker until Ubuntu repackages it (#2856)- Display output of build commands (#2926)
- Deprecate run.SetPrepareCmd (#2858)
- Deprecate test package (#2801, #2803, #2828)
- Freeze time in issue view test (#2843)
As always, a huge thank you to our contributors and users!
Have a good one~
GitHub CLI 1.5.0
New Commands
Add ability to comment on issues and pull requests (#2535, #2776)
gh issue comment and gh pr comment commands are now available
Add ability to clone gists (#2222)
gh gist clone is now available
New Features
-
pr view: Display top level review comments inline with regular comments #2757 -
repo fork: Add ability to specify fork remote name #1882 -
pr merge: Add ability to delete local branch for previously merged PRs (#2789, #2798)
Fixes
GitHub CLI 1.4.0
New features
View issue and pull request comment threads (#2462, #2575)
gh issue view and gh pr view commands now include the latest comment in their output. To render the entire comment thread, use the new --comments flag:
$ gh issue view <number> --commentsNote that, for now, gh pr view will only render regular comments and not review comments.
Manage GitHub Actions secrets (#2529)
The new gh secret commands enables setting, listing, and removing secrets for a repository or an organization. For example, to set a repository secret from file:
$ gh secret set MY_SECRET < file.txtTo manage organization secrets, you will need to require an additional permission scope for GitHub CLI:
$ gh auth refresh --scopes admin:org
For more information, see gh help secret set.
Set up git credentials when logging into GitHub CLI (#2449)
The gh auth login flow now includes a step to authenticate git as well when "HTTPS" is selected as the default clone protocol. This enables operations like git clone, git push, etc. to automatically work with GitHub on a pristine system after the user has authenticated to GitHub CLI. Previously, users had to authenticate git separately.
This is enabled by the git credential helper. In the background, GitHub CLI runs this for the user:
$ gh auth login
#=> git credential approve <<<"url=https://USERNAME:[email protected]"If no git credential helper was configured on the system, gh configures git to set itself as the credential helper for GitHub.
If you had already logged in with GitHub CLI, you can sync your git credentials with those of GitHub CLI with:
$ gh auth refresh --scopes workflow
# (the additional "workflow" scope is required for pushing changes to any Actions workflow files)Build system
-
Statically build our Linux binaries so they work on Alpine Linux #2556
-
Add
armv6build for Raspberry Pi #2621 -
Add
make install,make uninstalltargets for POSIX systems when building from source #2455
Fixes
GitHub CLI 1.3.1
Bug fixes
-
pr view: prioritize latest PR when looking up PRs for a branch #2479 -
issue create: fix respecting chosen action #2519 -
issue/pr create: avoid resetting metadata specified via flags #2472 -
pr create: allow interactive flow even if git commits could not be detected locally -
Allow setting GITHUB_ENTERPRISE_TOKEN to avoid
auth login#2521 -
pr create: document that reviewers can be teams #2465 -
Bump AlecAivazis/survey #2480
GitHub CLI 1.3.0
GitHub CLI 1.2.1
Security
- This fixes the security vulnerability where running
ghinside of an untrusted directory on Windows could lead to.\git.exe,.\git.bat, or a similarly crafted executable in the same directory being run instead of the systemgitcommand. See GHSA-fqfh-778m-2v32
Fixes
-
issue list: fetch and display all labels instead of just the first three #2312 -
pr view <branch>: allow viewing closed PRs #2276 -
pr create: omit the unnecessary and misleadingCreate a pull request for '<branch>' on GitHub by visiting: <URL>message generated bygit push#2016 -
pr checks: improve error message when no checks are reported #2279 -
repo clone: print friendly error for the required argument #2253 -
release create: print friendly error for the required argument #2351 -
garden: completely reset status line when moving around #2341 -
Allow running
ghcommands from Windows Explorer search bar #2076 #2383
GitHub CLI 1.2.0
Features
-
api: add flag--hostnameto set host target for api requests #2058 -
pr merge: add confirmation step in interactive mode #1622 -
auth login: add flag--scopesto set authorization scopes #2201 -
auth status: add flag--show-tokento display auth token #2157 -
config set: add validation of configuration values #2138 -
config set: add warning for unknown configuration keys #2183 -
Codespaces: add support for "integration" tokens #2207
-
Add
GH_NO_UPDATE_NOTIFIERenvironment variable to allow skipping of update checks #2134 -
Skip update checks in CI environments #2134
Bugs
-
issue list: fix result inconsistencies when specifying limit #2190 -
issue list: fix filtering by milestone for large milestone numbers #2178 -
repo clone: use canonical capitalization for remote URLs #2177 -
pr create: fix continue in browser for branches with special characters #2249 -
repo garden: fix incorrect terminal state after Ctrl-C #2205 -
Improve shell autocompletions for bash, zsh, and PowerShell #2237
Build
-
Rename the internal
commandpackage, resulting in a rename ofVersionandDatevariables passed via ldflags at build time #2247To set version and date when building from source, use the
GH_VERSIONandBUILD_DATEenvironment variables in conjunction with our Makefile.
GitHub CLI 1.1.0
Features
-
Support
GH_PAGERenvironment override forPAGER#2020 -
Disable terminal pager when its value is set to
cat#2021 -
repo view: add option to specify a branch #1766 -
repo view: render:emoji:syntax as emoji characters #1816
Bugs
-
Fix
pr createwhen branch was already pushed to a non-base remote #1926 -
pr status/view/create: fix API-related failures with GitHub Enterprise Server #2035 -
Fix markdown rendering when terminal pager is enabled #1917
-
repo create: respect repo name input given in interactive prompt #1880 -
auth login: display correct hostname in Personal Access Token instructions #1893 -
auth login: document minimum required token scopes #2057 -
pr checkout: fix running on detached HEAD #1889 -
pr merge: default to "no" for "delete branch after merge" prompt #1962 -
gist list: switch to GraphQL API to improve fetching #1763- support fetching more than 100 gists
- list gists ordered by creation time, descending
- for machine-readable output, serialize timestamps in RFC 3339 format
- ensure newlines in gist description are rendered as spaces
-
gist view/edit: fix passing Gist URL as argument #1781 -
gist edit: check ownership before editing #2034 -
gist edit: avoid updating gist when the contents haven't changed #1828 -
repo garden: fix for repositories with only a few commits #1967 -
repo garden: restore tty settings on exit #2072 -
Fix reading the current git branch name when it contains a non-breaking space #2025
-
Document
gh config set pager ...option #1710 -
Fix
.tarupload tests on different OSs #1738
GitHub CLI 1.0.0
Please see our installation instructions for help with installation or upgrading.
Features
-
Add
gh releasecommands for managing GitHub Releases #1552 -
Add
gh pr checkscommand #1563 -
Add
gh gist list/view/editcommands #1699 -
Improve resolving the base repository for all commands #1706
Additionally,
gh pr createnow prompts for where to push the current branch, including an option to create a fork, instead of trying to guess the head repository or automatically fork in the background.Add
gh pr create --head <branch>flag to explicitly set the head branch for automation and opt out of any forking/pushing functionality. -
Add
gh config set prompt disabledconfig setting #1639 -
Add
gh help environmenthelp topic listing all supported environment variables #1696 -
Add support for PAGER environment variable to enable a terminal pager program such as
less, also supported through thepagerconfig option #1630 -
Add
gh auth login --webflag #1642
Bugs
-
pr merge --squash: add pull request title to the commit subject #1627 -
pr create: prepend body defaults to the selected template #1611 -
repo view: do not HTML-escape output #1657 -
issue list: fix misalignment due to Unicode and emoji characters #1677 -
Fix terminal color display under various color schemes #1631
-
Fix zsh completion script #1707
-
Fix opening the web browser under WSL #1708
Thanks
Thank you to all our open source contributors and everyone who has provided valuable feedback during the beta period! For specific shout-outs, as well as some examples of what's possible using GitHub CLI, check out our announcement post.
v0.12.0
Features
-
New
gh authcommands for authentication: -
Add support for GitHub Enterprise Server #1517
- To get started, use
gh auth login - To clone a GHE repo:
gh repo clone example.com/owner/repo - Use
GH_HOSTenvironment variable to choose a default hostname for all commands
- To get started, use
-
Implement OAuth Device Authorization flow for github.com #1522
This enables authenticating to github.com when
ghis used on a machine that does not have a graphical web browser. The new flow enables opening a browser on a different machine to complete the authentication process. -
Publish repositories for Debian and RPM packages #1615
-
Add ability to create repositories from a repository template #1590
gh repo create <reponame> --template <owner>/<templaterepo> -
Enable using PAGER for
gh pr diffoutput #1534 -
Add
gh pr checkout --recurse-submodulesflag #1479 -
Add
gh pr close --delete-branchflag #1476 -
Allow omitting one's own username in
gh repo view <reponame>#1567 -
gh issue/pr viewnow include number and URL in machine-readable output #1580 -
Add
:branchplaceholder ingh api#1515 -
Support GraphQL
operationNamefield ingh api#1448
Bugs
-
Fix “TLS handshake timeout” on macOS #514
-
Fix
gh issues list --milestonefilter #1462 -
Fix color output on standard error on Windows #1579
-
Disallow
gh pr <command> --repo <repo>flag for commands that operate on the current branch #1585 -
Be transparent about which part of
gh pr createflow failed #1603 -
Fix detecting display width of common punctuation characters #1616
-
Filter bots out of
gh repo creditsoutput #1623