Github-cli: Difference between revisions
From wikinotes
No edit summary |
(→Usage) |
||
Line 64: | Line 64: | ||
--state closed `# open/closed/all` \ | --state closed `# open/closed/all` \ | ||
-w `# show in webbrowser` \ | -w `# show in webbrowser` \ | ||
</source> | |||
<source lang="bash"> | |||
gh api graphql --paginate -f query='query {repository(owner: "foo_user", name: "foo_repo"){ description }}' | |||
</source> | </source> | ||
</blockquote><!-- usage --> | </blockquote><!-- usage --> |
Latest revision as of 15:38, 24 October 2023
gh is github's official cli client.
Documentation
Locations
~/.config/gh/config.yml
configuration
Configuration
config.yml
git_protocol: https editor: prompt: enabled pager: aliases: co: pr checkouthosts.yml
github.com: user: <githubuser> oauth_token: <token> git_protocol: https
Usage
The interface is planned out in consistent major/minor commands.
major commands
gh pr gh issuesubcommands
status # tailored to you review-requests, mentions, assigned, etc. list # general to allExamples
gh pr list \ -a @me `# my prs` \ --state closed `# open/closed/all` \ -w `# show in webbrowser` \gh api graphql --paginate -f query='query {repository(owner: "foo_user", name: "foo_repo"){ description }}'