Written towards the goal of sharing my own practice with new team members, the
following offers an overview of how I use the
gh-dash CLI extension to manage
GitHub notifications and pull request discussion.
At scale, staying abreast of GitHub code review requests, GitHub issues of note, and related discussions is challenging. The challenges are further compounded when working across multiple GitHub organizations on both open and closed source projects, and especially when working as a member of multiple GitHub teams within one or more organizations.
- differentiating between extra curricular open source projects and employer projects
- differentiating between work associated with different teams within the same project
- differentiating between work on different repositories within the same GitHub organization
- differentiating between open, closed, merged, and draft PRs
- giving priority to employer projects during formal working hours
- keeping up with ongoing code review conversation on my own open pull requests
- keeping up with ongoing code review conversation on my own closed pull requests, if/when comments appear after the PRs have been merged
- getting notified of instances where my or my team’s code review is requested
- keeping up with ongoing conversation following submission of my code review
- discovering instances where I’m mentioned in conversation, but when my review has not been formally requested
- discovering relevant ongoing conversation on others’ closed PRs, after the PRs have been merged
- following important discussion on both open and closed PRs where my review has not been explicitly requested and where I’ve not been explicitly mentioned
- being able to further filter and/or create sub-categorizations of all of the above
(Much of the challenges above mention pull requests, but also apply to GitHub issues. For example, perhaps your employer uses Jira rather than GitHub issues, but your extra curricular open source work is tracked via GitHub issues.)
Other techniques and tooling exists for managing all this (email, Slack,
GitHub’s in-built notifications UI, etc.), though
gh-dash has been my favorite
for a few years.
gh-dash is a community-maintained extension to the gh CLI. It offers a customizeable terminal dashboard for filtering, sorting, and browsing GitHub pull requests, issues, and surrounding discussion and code reviews.
After installing the gh CLI,
gh-dash extension via
gh extension install:
gh extension install dlvhdr/gh-dash
Then, launch it via
Features of note
- open, non-draft PRs are displayed in the bold
- draft PRs, merged PRs, or closed PRs (as indicated by their icon) are displayed in non-bold muted text (or hidden entirely, depending on configuration)
- PRs are ordered by activity, so I can keep up with any ongoing discussion on closed and merged PRs
- additional icons represent details like code review status, required status checks, etc.
?toggles a help panel showing
gh-dash’s supported key commands
A few key command highlights:
rrefreshes the dashboard (refreshes also occur automatically at a configured interval)
stoggles between PR and issue views
jnavigate horizontally between tabbed categorizations of PRs and issues, within each view
ptoggles a preview window;
control uscroll the preview panel up and down respectivel.
callows you to comment directly from your terminal, though I rarely use this.
oopens the PR in your web browser
ycopies the PR URL to your pastebin
Cchecks out the PR branch locally
dshows the PR diff in your terminal
mmerges an approved PR
/allows you to interactively specify more granular search criteria
gh-dash can be easily customized via a YAML configuration file, its
configuration can also be changed over time to serve ever-evolving team dynamics,
project priorities, and needs. For example, my current configuration can be seen
though I’m often tuning this to better serve changing needs and nuance.
See gh-dash documentation for more details.
To learn more about extending the
gh CLI, see Extending the gh CLI with Go.