gh-dash/Tutorial/Triage Pull Requests in the Terminal
Properties
- tags
- gh-dash, Diataxis/Tutorial
- see-also
- GitHub/CLI/Extension, GitHub/CLI, GitHub/PR
Tutorial: Triage Pull Requests in the Terminal with gh-dash
What You'll Create
Prerequisites
- GitHub/CLI authenticated.
gh auth statusshould reportLogged in to github.com. - gh-dash installed.
gh dash --versionshould print a version banner. - A local checkout of a GitHub repository that has at least one open pull request. We will
cdinto it in step 1.
- GitHub/CLI authenticated.
Learning Goals
- Launch the dashboard and read its layout.
- Recognize the three default pull-request sections and the search behind each one.
- Control whether a section is scoped to one repository or to all of them.
- Edit a section's filter for the current session.
- Find any action's key from the help overlay, and read a diff.
Steps
1. Launch the dashboard
cdinto a repository checkout with open pull requests, then run- Running with no arguments picks a configuration file in this order: a
.gh-dash.ymlin the current git repo, then$GH_DASH_CONFIG, then~/.config/gh-dash/config.yml. With none of the first two present, the global file is used. - You will see a tab strip across the top, a search bar in a rounded box, a table of pull requests on the left, and a preview pane on the right. The bottom bar shows
PRs,Issues, the repo name, and? help.
2. Read the three section tabs
- The tab strip reads
My Pull Requests,Needs My Review,Involved, each with a live count. Each tab is one saved GitHub search, defined in~/.config/gh-dash/config.ymlunderprSections. - Press
lor→to move to the next section,hor←to move back. Notice the search bar text changes as you move — each tab really is a different query. - Press
jandk(or↓and↑) to move down and up the list. The preview pane on the right follows the selection.
- The tab strip reads
3. Notice that every section is scoped to this repository
- Look closely at the search bar on
My Pull Requests. It reads something like - The
repo:term is not inconfig.yml. gh-dash added it becausesmartFilteringAtLaunch: trueis set, which prepends the repository you launched from to every section's filter. - Press
lto move toNeeds My Reviewand confirm the samerepo:term is there. Smart filtering is applied to all sections, not just the one in view.
- Look closely at the search bar on
4. Widen the scope, then narrow it again
- Press
tto toggle smart filtering off. Therepo:term disappears, the filter falls back to exactly whatconfig.ymlsays, and the counts jump — every repository you have access to is now in scope. - Press
tagain to restore the repository scope. - This is the whole point of launching from a checkout:
gh dashin a repo is a review queue for that repo, andtturns it into your review queue everywhere.
- Press
5. Edit a section's filter
- Press
/. The search bar becomes an editable input, pre-filled with the full effective filter — including therepo:term smart filtering added. - Type a space and then
sort:created-ascto append it, and press Enter. - The section refetches and the oldest pull request is now first. Any GitHub/Search syntax works here, so
draft:false,label:bug, andreview:requiredall narrow the same way. - Press
/and then Escape to leave the filter untouched. - The edit lives in this session only —
~/.config/gh-dash/config.ymlis not rewritten. To keep a filter, editprSectionsin that file yourself.
- Press
6. Learn the review keys from the help overlay
- Press
?. A key map opens along the bottom of the screen. Press?again to close it. - Navigation and view keys sit in the same overlay:
rrefresh,Rrefresh all,ptoggle preview,Ptoggle preview position,[and]move through the preview's own tabs (Overview,Activity,Commits,Checks,Files Changed),Ctrl+dandCtrl+upage the preview,gandGjump to the first and last item. - Press
sto switch to the issues view. The tab strip becomesMy Issues,Assigned,Involved, and the filter readsis:issue …. Presssagain to return to pull requests.
- Press
7. Read a diff
- Select a pull request and press
d. - The full diff opens in a pager, filling the terminal. Move a line at a time with
jandk, search with/, and pressqto return to the dashboard with your selection intact. - The pager is gh-dash's own default. Set
pager.diffin~/.config/gh-dash/config.ymlto route diffs through something else —deltais the usual choice.
- Select a pull request and press
8. Leave
What You've Learned
gh dashlaunched from a repository checkout gives a review queue for that repository, becausesmartFilteringAtLaunchprependsrepo:to every section.h/lmove between the three sections; each is a stored GitHub search, andconfig.ymlis where their definitions live.ttoggles between "this repo" and "everywhere" without editing anything./edits the current section's filter for this session; Enter applies it, Escape cancels, and the config file is untouched either way.?is the reference for every action —vapprove,mmerge,ddiff,Ccheckout — andsswaps the whole dashboard between pull requests and issues.