Skip to content

Releases: cli/cli

GitHub CLI 2.23.0

08 Feb 02:14
94fe6c7
Compare
Choose a tag to compare

What's New

What's Changed

  • secret set: Fix setting Codespaces user secrets by @joshmgross in #6923
  • secret set: Fix setting Dependabot org secrets by @samcoe in #6941
  • secret set: Fix multiline values when reading from .env file by @mislav in #6932
  • run: Fix integer overflow error when more than 255 run attempts by @samcoe in #6935
  • extension browse: Improve usability and accessibility by @vilmibm in #6584
  • issue/pr edit: Fix adding/removing projects using flags by @samcoe in #6955
  • codespace delete: Default to authenticated user by @luanzeba in #6944
  • codespace create: Default to using current repo by @rneatherway in #6596
  • repo set-default: Fix interactive mode not showing all remotes by @despreston in #6969
  • GH_DEBUG: Fix API logging corrupting response bodies by @mislav in #6976
  • pr create/repo fork: Avoid implicitly fetching when adding a new git remote by @mislav in #6990
  • Sanitize ANSII control characters returned from the server by @samcoe in #6916, #6956
  • Disable gh update checker in our precompiled binaries by @mislav in #6977
  • Disallow update checker delaying the gh process by @mislav in #6978
  • Bump github.com/cli/oauth from 1.0.0 to 1.0.1 by @dependabot in #6948
  • Bump microsoft/setup-msbuild from 1.1.3 to 1.3.1 by @dependabot in #6973

Full Changelog: v2.22.1...v2.23.0

GitHub CLI 2.23.0-pre1

08 Feb 00:56
94fe6c7
Compare
Choose a tag to compare
Pre-release

What's Changed

  • Use int64 repository IDs for Codespaces user secrets by @joshmgross in #6923
  • Change uint8 to uint64 to hold job with more than 255 run attempts by @samcoe in #6935
  • Special case setting dependabot org secrets by @samcoe in #6941
  • Sanitize ANSII control characters returned from the server by @samcoe in #6916
  • Bump github.com/cli/oauth from 1.0.0 to 1.0.1 by @dependabot in #6948
  • gh ext browse followup by @vilmibm in #6584
  • Fix adding/removing projects using flags for edit commands by @samcoe in #6955
  • Bump microsoft/setup-msbuild from 1.1.3 to 1.3.1 by @dependabot in #6973
  • Fix panic by switching to use append in ASCII sanitization by @samcoe in #6956
  • secret set: enable multiline values when reading from .env file by @mislav in #6932
  • GH_DEBUG: fix api logging corrupting response bodies by @mislav in #6976
  • Support Fork with Default Branch Only by @jsoref in #6983
  • Disable gh update checker in our precompiled binaries by @mislav in #6977
  • Default to authenticated user on codespace delete by @luanzeba in #6944
  • Disallow update checker delaying the gh process by @mislav in #6978
  • Teach gh cs create to use current repo as default by @rneatherway in #6596
  • Avoid implicitly fetching when adding a new git remote by @mislav in #6990
  • Add visibility warning by @samcoe in #6980
  • Fix set-default interactive not showing all remotes by @despreston in #6969

Full Changelog: v2.22.1...v2.23.0-pre1

GitHub CLI 2.22.1

27 Jan 17:42
2561f80
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.22.0...v2.22.1

GitHub CLI 2.22.0

25 Jan 17:32
55053df
Compare
Choose a tag to compare

What's New

  • Add all-new Projects support to issue and PR commands by @qoega @samcoe in #6735 #6907

    Commands like gh issue create --project mytitle now work with all-new GitHub Projects, not just with “Projects (classic)” as it was before. However, an additional OAuth scope is needed to interact with new Projects. To enable this, run:

    gh auth refresh -h github.com -s project
  • Add search commits command by @kevhlee in #6817

  • Add repo edit --enable-discussions by @azu in #6903

  • auth status now shows token scopes by @mntlty in #6546

  • extension create now makes the initial git commit by @mntlty in #6833

What's Changed

New Contributors

Full Changelog: v2.21.2...v2.22.0

GitHub CLI 2.21.3-pre.0

10 Jan 19:14
fc21c87
Compare
Choose a tag to compare
Pre-release

What's Changed

New Contributors

Full Changelog: v2.21.2...v2.21.3-pre.0

GitHub CLI 2.21.2

03 Jan 22:54
82156f7
Compare
Choose a tag to compare

What's Changed

  • docs: update codespace installation instructions by @levenleven in #6781
  • Bump github.com/mattn/go-isatty from 0.0.16 to 0.0.17 by @dependabot in #6794
  • Bump github.com/gdamore/tcell/v2 from 2.5.3 to 2.5.4 by @dependabot in #6798
  • Handle erase operation in auth git-credential command by @samcoe in #6805
  • select base repo correctly when only one remote by @vilmibm in #6803

New Contributors

Full Changelog: v2.21.1...v2.21.2

GitHub CLI 2.21.2-pre0

03 Jan 22:37
82156f7
Compare
Choose a tag to compare
Pre-release

What's Changed

  • docs: update codespace installation instructions by @levenleven in #6781
  • Bump github.com/mattn/go-isatty from 0.0.16 to 0.0.17 by @dependabot in #6794
  • Bump github.com/gdamore/tcell/v2 from 2.5.3 to 2.5.4 by @dependabot in #6798
  • Handle erase operation in auth git-credential command by @samcoe in #6805
  • select base repo correctly when only one remote by @vilmibm in #6803

New Contributors

Full Changelog: v2.21.1...v2.21.2-pre0

GitHub CLI 2.21.1

23 Dec 16:37
6618baa
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.21.0...v2.21.1

GitHub CLI 2.21.0

22 Dec 22:17
7ffa87f
Compare
Choose a tag to compare

What's New

Selecting a default repository

When running a gh command for the first time in a local git repository that has multiple git remotes, gh used to interactively ask Which should be the base repository? so that the user may choose the git remote to default to when making queries to GitHub repositories. This had several problems:

  • Some users did not fully understand what they are being asked to choose;
  • The term “base repository” isn't an established GitHub term, except in the context of Pull Requests;
  • Once chosen, the only way to undo or change the choice made was to manually edit .git/config in the local repository.

The new behavior is as follows:

  • gh commands in a repository with multiple remotes will now error out until a default has been chosen.
  • The new gh repo set-default command can be used to select a default, view the selected value, or undo the selection altogether.

Thank you @bchadwic and @vilmibm! #4859 #6738

Internal git operations are now always authenticated

Previously, it could be confusing that a properly authenticated gh repo clone <repo> command could fail with a prompt for GitHub password. The underlying reason was that gh repo clone would shell out to git clone <url>, and from then on the authentication was entirely up to git's own credential management. If git wasn't set up to authenticate to GitHub, this could result in a generic password prompt, which appeared as if it was coming from gh.

The best general solution for setting up git to use credentials from GitHub CLI is to run gh auth setup-git. However, in this release, gh ensures that all underlying git operations are authenticated by gh, even if git on its own wasn't configured with a credential helper.

The way this works is by injecting extra configuration arguments when shelling out to git:

git -c credential.helper='!gh auth git-credential' clone <url>

Thank you @samcoe! #6541

The gh api command now accepts nested JSON parameters

The gh api command is similar to the popular curl tool, but with JSON encoding & parsing support and with built-in GitHub authentication. Sending JSON POST parameters was as easy as:

gh api <endpoint> -f 'param1=value1' -f 'param2=value2'

Now there is also a way to send nested JSON objects and arrays via a special brackets syntax when specifying field names:

gh api <endpoint> -f 'head[branch][name]=main'

gh api <endpoint> -f 'labels[]=bug' -f 'labels[]=priority-1'

Thank you @mislav! #6614

Other goodies

What's Changed

  • ap: avoid sending empty JSON body when no params for a non-GET request by @mislav in #6775
  • release: more resilient release creation and asset management by @mislav in #6667
    • A failed release create no longer leaves a temporary draft release behind
    • A draft release made by release create is now immediately referencable by tag name
    • Failed asset uploads will get retried several times
    • Fix clobbering existing files in release download by @mislav in #6694
  • pr create: exclude the current user from potential reviewers by @nsmag in #6464
  • codespace ports: use new domain in URLs of forwarded ports by @jshorty in #6705
  • Document installing GitHub CLI in Codespaces by @mislav in #6653
  • docs: Update installation instructions for WinGet by @vegerot in #6716
  • Update Cobra and make use of its new command grouping by @mislav in #6589
  • Update go-gh to v1.0.0 by @samcoe in #6618
  • Bump mislav/bump-homebrew-formula-action from 1 to 2 by @dependabot in #6634
  • Upgrade to Go 1.19 by @mislav in #6723
  • Use Prompter in pr package by @vilmibm in #6451
  • Use Prompter in release command by @vilmibm in #6711
  • Linter fixes by @samcoe in #6722
  • Bump goreleaser/goreleaser-action from 3 to 4 by @dependabot in #6727
  • Fix signing Windows exe on release by @mislav in #6776

New Contributors

Full Changelog: v2.20.2...v2.21.0

GitHub CLI 2.21.0-pre.5

22 Dec 20:57
46daf49
Compare
Choose a tag to compare
Pre-release