Bot releases are hidden (Show)
Published by mislav about 4 years ago
Please see our installation instructions for help with installation or upgrading.
Add gh release
commands for managing GitHub Releases #1552
Add gh pr checks
command #1563
Add gh gist list/view/edit
commands #1699
Improve resolving the base repository for all commands #1706
Additionally, gh pr create
now 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 disabled
config setting #1639
Add gh help environment
help 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 the pager
config option #1630
Add gh auth login --web
flag #1642
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
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.
Published by mislav about 4 years ago
New gh auth
commands for authentication:
gh auth status
#1495gh auth login
#1445gh auth refresh
#1501gh auth logout
#1491Add support for GitHub Enterprise Server #1517
gh auth login
gh repo clone example.com/owner/repo
GH_HOST
environment variable to choose a default hostname for all commandsImplement OAuth Device Authorization flow for github.com #1522
This enables authenticating to github.com when gh
is 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 diff
output #1534
Add gh pr checkout --recurse-submodules
flag #1479
Add gh pr close --delete-branch
flag #1476
Allow omitting one's own username in gh repo view <reponame>
#1567
gh issue/pr view
now include number and URL in machine-readable output #1580
Add :branch
placeholder in gh api
#1515
Support GraphQL operationName
field in gh api
#1448
Fix “TLS handshake timeout” on macOS #514
Fix gh issues list --milestone
filter #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 create
flow failed #1603
Fix detecting display width of common punctuation characters #1616
Filter bots out of gh repo credits
output #1623
Published by mislav about 4 years ago
GLAMOUR_STYLE
environment variable #1411Fix printing network error in case for failed HTTP requests #1382
Fix creating gists from stdin with argument #1383
Correctly report HTTP and Markdown errors in repo view
#1403
Automatically adapt Markdown rendering for light terminal backgrounds #1402
gh pr
command scriptability improvements #1373
gh repo
command scriptability improvements #1388
Misc. scriptability improvements #1387
Published by mislav over 4 years ago
Add support for “shell” aliases #1191
Add --milestone
and --mention
filters to gh issue list
#644
Add --web
flag to gh issue/pr list
#1282
Add gh api --silent
flag to avoid printing HTTP response #1283
Print issue/PR title in confirmation messages from gh issue close/reopen
and gh pr close/reopen
#1337
Scriptability improvements for gh issue list/view/create
commands #1343
gh pr checkout
now prevents flag injection to git checkout
via maliciously crafted head branch name #1365
gh pr checkout OWNER:BRANCH
now avoids clashes with the default branch of a repository #1365
gh pr merge
now gracefully handles when the merged branch is auto-deleted on the server per repository settings #1279
Avoid crash in gh issue close/reopen
when issue number is invalid #1328
Support hosts.yml
existing while config.yml
does not #1304
Raise more informative filesystem path error after failing to read or create the config file #1295
Avoid warning about missing read:org
OAuth scope if the authenticating token has admin:org
#1359
Improve support for legacy issue and pull request template names #1366
Document supported environment variables #1370
Remove the -R, --repo
flag mention from commands where it's not applicable #1253
Add VS Code example to gh config set
documentation #1301
Published by mislav over 4 years ago
gh api --paginate
The api
command now offers functionality to recursively fetch next pages of results until all results have been fetched:
# list all repositories owned by the authenticating user
$ gh api --paginate -XGET user/repos -f affiliation=owner | jq -r '.[].full_name'
# the same but in GraphQL
$ gh api --paginate graphql -f query='
query($endCursor: String) {
viewer {
repositories(first: 100, after: $endCursor, affiliations: [OWNER]) {
nodes {
nameWithOwner
}
pageInfo {
hasNextPage
endCursor
}
}
}
}
' | jq -r '.data.viewer.repositories.nodes[].nameWithOwner'
(#1222)
Fix pr create
not respecting template when editor was skipped #1243
Fix pr checkout OWNER:BRANCH
invocation setting up upstream configuration in case maintainers are allowed to modify the pull request branch #1252
Fix pr status
not working in detached HEAD state #1155
Do not output ANSI colour escape sequences from issue/pr/repo view
if standard output is redirected elsewhere #1187
Improve error reporting and exit status for mistyped command names #1221
Improve error reporting when someone might have forgotten to quote values with spaces #1147
Documentation improvements #1179 #1204
Added description text to Debian/RPM packages #1211
Published by mislav over 4 years ago
gh
now provides direct access to both the GitHub GraphQL and REST APIs. :owner
and :repo
can
be used as placeholders for the owner/repo you are running gh
in.
$ gh api repos/:owner/:repo/releases
$ gh api graphql -F owner=':owner' -F name=':repo' -f query='
query($name: String!, $owner: String!) {
repository(owner: $owner, name: $name) {
releases(last: 3) {
nodes { tagName }
}
}
}
'
(#1165, #909, #1093, #1115, #1148, #1114, #1150)
If you want to type fewer characters when using gh
, the new gh alias
command allows you to set
up shortcuts. You can use sequential placeholders like $1
and $2
to insert arguments into alias
expansions.
For example, running gh alias set co 'pr checkout'
now lets you run gh co
instead of gh pr checkout
.
Much like chocolate and red wine, this new feature pairs well with gh api
:
$ gh alias set heart 'api -H Accept:application/vnd.github.squirrel-girl-preview+json repos/:owner/:repo/issues/$1/reactions --raw-field content=heart'
$ gh heart 123
In the above example, we've created the alias heart
that takes one argument, an issue ID. It will
emoji react a heart onto the provided issue <3
Future alias support will allow shelling out to non-gh commands.
(#970, #991, #1103)
You can now instruct gh
to use a specific authentication token by setting the GITHUB_TOKEN
environment variable. This enables using gh
in non-interactive contexts such as CI jobs.
You may generate Personal Access Tokens here. It's recommended that the token has at least repo
and read:org
scopes.
(#976)
gh
's configuration is now split into two files: config.yml
and hosts.yml
. Authentication
information goes in hosts.yml
, so users are now free to add config.yml
to their dotfiles
repositories.
This change means that gh
will be migrating your config to the new format on first write; if you
want to get the new format you can either delete config.yml
and re-authenticate or
run a gh config set
command to trigger a write of the config.
(#1077)
Our help docs got a spring cleaning both on the command line and in the manual. The output of gh help
should be more legible and useful now.
(#1106, #1167, #1166, #998, #1059, #1126)
gh gist create
is now supported. You can pass it a filename for posting or pipe something via STDIN. This actually shipped a little while ago but we didn't announce it. Now you know!
gh issue/pr create --web
mode #992gh repo clone myrepo
now assumes the authenticated user as default owner #861gh issue/pr create
#950gh issue/pr list --limit
flag #1157As always, THANK YOU! to our numerous community contributers <3
all the best,
vilmibm and the whole CLI team
Published by mislav over 4 years ago
This release expands the GitHub pull request work flow with the ability to view pull request diffs,
review pull requests, and merge pull requests.
$ gh pr checkout 123
$ gh pr diff
$ gh pr review --approve -b "lgtm"
$ gh pr merge
Both gh pr review
and gh pr merge
feature interactive modes by default.
You can also now mark a draft pull request as ready for review with gh pr ready
.
( #885, #873, #960, #962, #899, #982 )
We are now packaging man pages with our linux releases #915. Thanks @mtfurlan!
pr create
#912pr view
with reviewers #975We on the CLI team hope that folks are as good as can be in these times.
best,
@vilmibm
Published by mislav over 4 years ago
This release features new functionality as well as bug fixes. The new functionality largely focuses on making it easier to work with pull requests.
When creating pull requests and issues you can now select Add Metadata
in the final prompt to assign reviewers, labels, and more. This metadata can also be added with flags instead of interactively. See gh help pr create
or gh help issue create
for more information.
(#819, #839, #787)
For example, you can now run:
gh pr close 123
gh pr reopen 123
to manage a pull request's state.
(#863, #843, #853, #854)
gh help
output #815read:org
OAuth scope, warn for outdated tokens #786RunCommand
less brittle #856...also there is a fun hidden command now. see if you can find it :3
Have a great day!
-vilmibm
Published by mislav over 4 years ago
The big theme of this release is the new gh config
command that gives you control over two aspects of gh
usage: defaulting to preferring SSH git remotes and setting a preferred editor. To learn more check out the manual!
gh config
#728, #814, #810, #816issue view
and pr view
#667pr view
#748issue view
#745repo clone
#721, #727pr create
finding the right commits after repo fork
#731, #752completion
command #761issue/pr/repo view
documentation #764Thanks to all our community contributors in this release! <3
Published by mislav over 4 years ago
pr create
#726Published by mislav over 4 years ago
gh issue/pr view
changes
gh repo view/fork
improvements
gh pr checkout/view/status
improvements
Respect base repository when passing URL argument to pr checkout/view #687
Add unicode to pr status #683
Prevent crash when encountering "STALE" check conclusion #707
gh pr create
improvements
Miscellaneous
Published by mislav over 4 years ago
gh pr create
improvements:
Autofill title & body using information from git commit messages #590
Check for existing pull request before attempting to open a new one #668
Ensure all inputs are validated before forking and/or pushing the head branch #618
gh pr status
improvements:
Show state instead of checks and reviews for closed/merged pull request belonging to the current branch #624
Allow use in cases when there is no current git branch #670
Only show the most recent pull request for the current branch #638
gh issue/pr list
improvements:
Add ability to list issues by author #625
Avoid showing duplicated pull requests in output #594
Show the total number of issues/pull requests in output header #440
Unify output formats between issue list
and issue status
#532
gh repo
improvements:
Fix repo create --homepage <URL>
#617
Verify repository exists when using repo view <repo>
#598 #629
Consistent punctuation in repo
docs #586
Miscellaneous:
Don't require a local git repository when --repo
flag is used #656
Fix issue view
usage description #651
Improve callback handling during authorization flow to enable authentication in certain browsers #650
Add support for PowerShell completion #591
Published by mislav over 4 years ago
Add fork, clone, create, view to repo
usage #578
Bump glamour dependency #583
Published by mislav over 4 years ago
New commands:
Add repo clone <repo>
command #545
Add repo create
command #547
Add repo fork
command #549
Add repo view
command #337
Fixes:
Preserve explicit title & body in issue create --web
#538
Support issue list --limit=N
where N is greater than 100 #541
Ensure that gh <command> -h
is equivalent to --help
#574
Fix detecting PR for current branch pushed to fork #567
Improvements:
More detailed logging for HTTP requests to stderr with DEBUG=1
#306
Show git push
output during pr create
#539
Use gray color for PR number if PR is a draft #550
Print authentication tip when opening the browser fails #553
Handle properly passed #<num>
as equivalent to <num>
for PRs and Issues #474
Improve error message for issue URL with no args #560
Add ability to visually differentiate pull requests by their state #530
Published by mislav over 4 years ago
Better error when running in a repo with no git remotes #521
Fix column alignment and truncation for Eastern Asian languages #518
Respect title & body from arguments to pr create -w
#523
Published by mislav over 4 years ago
Ensure GitHub CLI uses production OAuth application even when built from source #492
If you had trouble using gh
for your private organization repository, please try upgrading and forcing re-authentication by doing rm ~/.config/gh/config.yml
.
Fix crash in gh issue/pr list
for narrow terminals #495
Include merged PRs with gh issue/pr list --state=closed
#513
Respect overriden base branch in pr create --web
#483
Preserve issue/PR template when skipping editor phase in gh issue/pr create
#497
Support reproducible builds in Makefile #406
Have gh --version
display correct version when installed via go get
#491
Use glamour as markdown rendering backend for issue/PR previews #311
Provide linux builds for arm64 #459
Handle runtime errors when generating shell completions #505
Published by mislav over 4 years ago
Update make site-docs
to reflect latest setup #285
Fix link to docs on README.md #304
Prefix branch names when checking out a PR locally #302
use new goreleaser config #322
doc: add arch install instructions #318
Check for $GIT_EDITOR first #329
Add .vscode and .DS_Store to .gitignore #338
Add Bugfix Pull Request Template #346
Make approval statuses sentence case #347
Update docs link to correct manual page #358
Change AUR package #363
More nuanced handling of parent/fork in various commands #355
Fix wrong repo url being used for pushing #420
Add availability section to README #415
Make sure editor is set properly & not overridden later #387
Fix: Nil pointer dereference while previewing PR and Issues with empty body #405
Cross repo pr create #362
revert pr checkout branch prefixing #429
Published by mislav over 4 years ago
put homebrew formula back in the right place #301
ADD installation from source section to README. #289
Published by mislav over 4 years ago
Add fish completion support #271
Fix gh version
printing the correct changelog link #274
Add more binary builds, simplify release process #276
Print repo and user context for status commands #278
Setup fish completion when installing with Homebrew #281
Fix typos #292
fix: Fix typos #291
scoop config for gh #298