prs
lets you stay updated on pull requests from your terminal.
For my day job as a tech lead, I need to stay updated on several PRs, and my
hope is that prs
will let me do that faster than the Github web UI (or other
tools for that matter).
homebrew:
brew install dhth/tap/prs
go:
go install github.com/dhth/prs@latest
Or get the binaries directly from a release. Read more about verifying the authenticity of released artifacts here.
You can have prs
make authenticated calls to GitHub on your behalf in either
of two ways:
- Have an authenticated instance of gh available (recommended).
- Provide a valid Github token via
$GH_TOKEN
.
prs
has two modes:
- Query mode (default): lets you search PRs based on a query you provide (based on github's search syntax)
- Repos mode: let you pick a repository from a predefined list
prs --query='type:pr repo:neovim/neovim state:open label:lua linked:issue'
# view open PRs where you're the author
prs -q 'type:pr author:@me state:open'
# view open PRs where a review has been requested from you
PRS_QUERY='type:pr user-review-requested:@me state:open' prs
# read query from prs' config file
prs
prs --mode=repos --repos='dhth/prs,dhth/omm,dhth/hours'
PRS_REPOS='dhth/prs,dhth/omm,dhth/hours' prs --mode=repos
# read repos from prs' config file
prs -m repos
prs
accepts configuration from any of the following:
-
Command line flags (run
prs -h
for details) -
Environment variables (eg.
PRS_QUERY
) -
prs
's config file, which looks like this:num: 20 repos: - dhth/omm - dhth/hours - dhth/prs - neovim/neovim - junegunn/fzf - BurntSushi/ripgrep - charmbracelet/bubbletea - goreleaser/goreleaser - dandavison/delta query: 'type:pr repo:neovim/neovim state:open label:lua linked:issue'
For every configuration property, the order of priority is: flag >> environment variables >> config file
, ie, flags take the highest priority.
q/esc/ctrl+c go back
Q quit from anywhere
? Open Help View
d Open PR Details View
ctrl+v Show PR details using gh
Indicators for current review decision:
Β± implies CHANGES_REQUESTED
π‘ implies REVIEW_REQUIRED
β
implies APPROVED
β/tab/shift+tab/2 Switch focus to PR Timeline View
ctrl+s Switch focus to Repo List View (when --mode=repos)
ctrl+d Show PR diff
ctrl+r Reload PR list
ctrl+b Open PR in browser
h/N/β Go to previous section
l/n/β Go to next section
1/2/3... Go to specific section
J/] Go to next PR
K/[ Go to previous PR
d Go back to last view
ctrl+b Open PR in browser
tab/shift+tab/1 Switch focus to PR List View
β/3 Show details for PR timeline item (when applicable)
ctrl+d Show PR diff
ctrl+b Open timeline item in browser
ctrl+r Reload PR timeline
1 Switch focus to PR List View
2 Switch focus to PR Timeline List View
ctrl+d Show PR diff
ctrl+b Open timeline item in browser
h/N/β Go to previous section
l/n/β Go to next section
In case you get the prs
binary directly from a release, you may want to
verify its authenticity. Checksums are applied to all released artifacts, and
the resulting checksum file is signed using
cosign.
Steps to verify (replace the version in the commands listed with the one you want):
-
Download the following files from the release:
- prs_1.0.0_checksums.txt
- prs_1.0.0_checksums.txt.pem
- prs_1.0.0_checksums.txt.sig
-
Verify the signature:
cosign verify-blob prs_1.0.0_checksums.txt \ --certificate prs_1.0.0_checksums.txt.pem \ --signature prs_1.0.0_checksums.txt.sig \ --certificate-identity-regexp 'https://github\.com/dhth/prs/\.github/workflows/.+' \ --certificate-oidc-issuer "https://token.actions.githubusercontent.com"
-
Download the compressed archive you want, and validate its checksum:
curl -sSLO https://github.com/dhth/prs/releases/download/v1.0.0/prs_1.0.0_linux_amd64.tar.gz sha256sum --ignore-missing -c prs_1.0.0_checksums.txt
-
If checksum validation goes through, uncompress the archive:
tar -xzf prs_1.0.0_linux_amd64.tar.gz ./prs # profit!
prs
is built using bubbletea, and released via goreleaser.