GitHub CLI Issues and Actions

Issue triage plus GitHub Actions workflows, runs, secrets, variables, and caches.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

Issues

Create, edit, assign, and close issues.

List issues

List open issues.

bashANYissuelist
bash
gh issue list

List open issues.

View an issue

Show issue details.

bashANYissueview
bash
gh issue view 123

Show issue details.

Create an issue

Create an issue with title and body.

bashANYissuecreate
bash
gh issue create --title "Bug: login fails" --body "Steps to reproduce..."

Create an issue with title and body.

Create issue with labels and assignee

Create an issue with metadata.

bashANYissuecreate
bash
gh issue create --title "Upgrade Node" --label tech-debt --assignee @me

Create an issue with metadata.

Edit an issue

Edit issue labels, assignees, and milestone.

bashANYissueedit
bash
gh issue edit 123 --add-label bug --remove-label needs-triage

Edit issue labels, assignees, and milestone.

Comment on an issue

Add an issue comment.

bashANYissuecomment
bash
gh issue comment 123 --body "Investigating now."

Add an issue comment.

Close an issue

Close an issue and leave a comment.

bashANYissueclose
bash
gh issue close 123 --comment "Fixed in #456"

Close an issue and leave a comment.

Reopen an issue

Reopen a closed issue.

bashANYissuereopen
bash
gh issue reopen 123

Reopen a closed issue.

Pin an issue

Pin an issue in the repository.

bashANYissuepin
bash
gh issue pin 123

Pin an issue in the repository.

Unpin an issue

Unpin a previously pinned issue.

bashANYissuepin
bash
gh issue unpin 123

Unpin a previously pinned issue.

Lock an issue

Lock issue conversation.

bashANYissuelock
bash
gh issue lock 123 --reason resolved

Lock issue conversation.

Unlock an issue

Unlock issue conversation.

bashANYissuelock
bash
gh issue unlock 123

Unlock issue conversation.

Show issue status

Show issues assigned to you, mentioned, or created by you.

bashANYissuestatus
bash
gh issue status

Show issues assigned to you, mentioned, or created by you.

Create a label

Create a repository label.

bashANYlabelcreate
bash
gh label create "customer-impact" --color FF0000 --description "Affects customers"

Create a repository label.

Clone labels from another repo

Copy labels from another repository.

bashANYlabelclone
bash
gh label clone octo-org/source-repo

Copy labels from another repository.

Delete a label

Delete a label without prompting.

bashANYlabeldelete
bash
gh label delete "old-label" --yes

Delete a label without prompting.

GitHub Actions and Workflows

List, run, rerun, and inspect workflows and runs.

List workflows

List workflows in the current repository.

bashANYactionsworkflow
bash
gh workflow list

List workflows in the current repository.

View workflow details

Show details for a workflow.

bashANYactionsworkflow
bash
gh workflow view "CI"

Show details for a workflow.

Trigger a workflow

Dispatch a workflow with inputs.

bashANYactionsworkflowdispatch
bash
gh workflow run deploy.yml -f environment=staging

Dispatch a workflow with inputs.

Enable a workflow

Enable a disabled workflow.

bashANYactionsworkflow
bash
gh workflow enable deploy.yml

Enable a disabled workflow.

Disable a workflow

Disable a workflow.

bashANYactionsworkflow
bash
gh workflow disable deploy.yml

Disable a workflow.

List workflow runs

List recent workflow runs.

bashANYactionsrun
bash
gh run list --limit 50

List recent workflow runs.

View a run

Show status and jobs for a workflow run.

bashANYactionsrun
bash
gh run view 123456789

Show status and jobs for a workflow run.

View run log

Print logs for a workflow run.

bashANYactionsrunlogs
bash
gh run view 123456789 --log

Print logs for a workflow run.

Watch a run live

Follow a workflow run until completion.

bashANYactionsrunwatch
bash
gh run watch 123456789

Follow a workflow run until completion.

Download run artifacts

Download artifacts for a workflow run.

bashANYactionsrunartifacts
bash
gh run download 123456789 -D ./artifacts

Download artifacts for a workflow run.

Rerun failed jobs

Rerun failed jobs from a workflow run.

bashANYactionsrunrerun
bash
gh run rerun 123456789 --failed

Rerun failed jobs from a workflow run.

Cancel a run

Cancel an in-progress workflow run.

bashANYactionsruncancel
bash
gh run cancel 123456789

Cancel an in-progress workflow run.

List Actions caches

List GitHub Actions caches.

bashANYactionscache
bash
gh cache list

List GitHub Actions caches.

Delete an Actions cache

Delete an Actions cache by key.

bashANYactionscache
bash
gh cache delete my-key

Delete an Actions cache by key.

List repo secrets

List Actions secrets for the repo.

bashANYactionssecret
bash
gh secret list

List Actions secrets for the repo.

Set repo secret

Create or update a repository secret from stdin.

bashANYactionssecret
bash
gh secret set AWS_ACCESS_KEY_ID < aws_access_key_id.txt

Create or update a repository secret from stdin.

List Actions variables

List repository variables.

bashANYactionsvariable
bash
gh variable list

List repository variables.

Set repository variable

Create or update a repository variable.

bashANYactionsvariable
bash
gh variable set APP_ENV --body production

Create or update a repository variable.

Recommended next

No recommendations yet.