gh

Pull Requests

gh pr create - Create a pull request on GitHub

gh pr checkout [<number> | <url> | <branch>] --force - Check out a pull request and reset the existing local branch to the latest state of the pull request

gh pr merge [<number> | <url> | <branch>] --squash --delete-branch --admin - Merge a pull request, squash the commits into one commit, delete the local and remote branch after merge, use administrator privileges

gh pr edit [<number> | <url> | <branch>] --add-label "$(gh label list --json name --jq ".[].name" | fzf)" - Add label via fzf (list all labels from repository)

gh pr edit [<number> | <url> | <branch>] --remove-label "$(gh pr view [<number> | <url> | <branch>] --json labels --jq ".labels.[].name" | fzf)" - Remove label via fzf (list all labels from pull request)

GitHub Actions

gh run list --branch [<branch>] - List recent workflow runs for branch

gh run view [<run-id>] - View a summary of a workflow run

gh run view [<run-id>] --log - View full log for a run

gh cache list - List GitHub Actions caches

gh cache delete [<cache-id>| <cache-key>] or gh cache delete --all - Delete a specific / all GitHub Actions caches

Extensions

gh extension list - List installed extensions

gh extension install <repository> --force - Install an extension and force upgrade, or ignore if latest already installed

gh extension upgrade --all - Upgrade all installed extensions

gh-dash

General

A GitHub (gh) CLI extension to display a dashboard with pull requests and issues by filters you care about.

gh-dash

Movement

k - Move up

j - Move down

h - Previous section

l - Next section

g - First item

G - Last item

Ctrl + d - Preview page down

Ctrl + u - Preview page up

Refresh, Open, Copy

r - Refresh

R - Refresh all

s - Switch view

p - Open in Preview

o - Open in GitHub

O - Open in Neovim

y - Copy number

Y - Copy url

/ - Search

Actions

y - Approve

a - Assign

A - Unassign

c - Comment

d - Diff

D - Open diff in Neovim

C - Checkout

x - Close

W - Ready for review

w - Watch checks

X - Reopen

m - Merge

M - Merge (admin)

u - Update pr from base branch

Ctrl + l - Add label to PR

Ctrl + k - Remove label from PR

Ctrl + w - Show logs for a workflow run

Misc

? - Help

q - Quit