GitHub CLI 2.21.0 #6777
Replies: 1 comment
-
|
Thanks for addressing #2090! I think the solution is great in terms of behavior, but perhaps the nomenclature could be better. In particular, as @mislav said here, referring to a "default repository" (which is implied by the command I also don't think the reference to "this directory" is an intuitive nomenclature. I tend to think of the directory containing a git repository as "the local repository", not as a generic directory. So I'd also suggest changing the phrasing in: cli/pkg/cmd/repo/setdefault/setdefault.go Line 63 in 6618baa cli/pkg/cmd/repo/setdefault/setdefault.go Line 238 in 6618baa Line 95 in 6618baa ...to say e.g. "default remote for this repository". |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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:.git/configin the local repository.The new behavior is as follows:
gh repo set-defaultcommand 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 thatgh repo clonewould shell out togit 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 fromgh.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:
Thank you @samcoe! #6541
apicommand can now send nested JSON parametersThe
gh apicommand is similar to the popularcurltool, but with JSON support and with built-in GitHub authentication. Sending POST parameters was as easy as:Now there is also a way to send nested JSON objects and arrays via a special key syntax:
🎉 #6614
Other goodies
issue lock/unlockandpr lock/unlockcommands by @chemotaxis in Addlockandunlockcommands for issues and pull requests #5333release create: add--verify-tagflag by @luanzeba in Add --verify-tag flag for release creation command #6632release create: add--exclude-pre-releasesflag by @owenvoke in feat: add support to exclude pre-releases #6625repo create: prompt for repository owner in interactive mode by @twelvelabs in Prompt for owner when interactively creating repos #6578repo edit: add--allow-update-branchflag by @browniebroke in Add--allow-update-branchto therepo editcommand #6706extension upgrade: show version change information by @despreston in Show version diff when updating a single extension #6647-Rfor--reposhorthand and deprecate-rby @cmbrose in Codespaces: Use -R for --repo shorthand and deprecate -r #6725codespace create: allow setting display name for the new codespace by @despreston in Allow setting codespace display name during create #6739alias list: change output format to YAML by @ptforness in Change alias list output format to YAML #6603authorinformation inpr listJSON output by @hirasawayuki in Add author information inpr listJSON output #5049isDrafttosearch prsjson options, matchingpr viewby @mgabeler-lee-6rs in AddisDrafttosearch prsjson options, matchingpr view#6704What's Changed
ap: avoid sending empty JSON body when no params for a non-GET request by @mislav in Avoid sending empty JSON body when no params to api command #6775release: more resilient release creation and asset management by @mislav in More resilient release commands #6667release createno longer leaves a temporary draft release behindrelease createis now immediately referencable by tag namerelease downloadby @mislav in Fix clobbering old files in release download #6694pr create: exclude the current user from potential reviewers by @nsmag in Exclude the current user from reviewers when creating pr #6464codespace ports: use new domain in URLs of forwarded ports by @jshorty in Use new domain for forwarded ports #6705prpackage by @vilmibm in use Prompter in pr package #6451releasecommand by @vilmibm in port release command to prompter #6711New Contributors
Full Changelog: v2.20.2...v2.21.0
This discussion was created from the release GitHub CLI 2.21.0.
Beta Was this translation helpful? Give feedback.
All reactions