69 lines
2.1 KiB
Markdown
69 lines
2.1 KiB
Markdown
# gh-threads
|
|
|
|
A read-only terminal UI for people receiving GitHub pull-request reviews. It
|
|
shows open PRs, review threads with highlighted diff hunks and comment authors,
|
|
reviewer/assignee state, and the latest commit's check rollup. Resolved threads
|
|
start folded. GitHub suggestion blocks are shown as syntax-highlighted
|
|
remove/add previews. The current PR is refreshed in the background.
|
|
|
|
## Install and run
|
|
|
|
Requires Go 1.24+ and an authenticated GitHub CLI:
|
|
|
|
```sh
|
|
go install .
|
|
gh auth login
|
|
gh-threads --repo owner/repository
|
|
```
|
|
|
|
To run directly from a source checkout instead:
|
|
|
|
```sh
|
|
go run . --repo owner/repository
|
|
```
|
|
|
|
Use `go run .`, not `go run main.go`: the latter compiles only `main.go` and
|
|
omits the other files in the package.
|
|
|
|
For automation, `GH_TOKEN` or `GITHUB_TOKEN` can still be provided and takes
|
|
precedence over the GitHub CLI credential. Enterprise token environment
|
|
variables are also supported.
|
|
|
|
By default the PR picker only includes open PRs authored by the authenticated
|
|
user. Pass `--all` to include every open PR:
|
|
|
|
```sh
|
|
gh-threads --repo owner/repository --all --poll 15s
|
|
```
|
|
|
|
GitHub Enterprise Server can be used after authenticating that host:
|
|
|
|
```sh
|
|
gh auth login --hostname github.example.com
|
|
gh-threads --repo owner/repository \
|
|
--endpoint https://github.example.com/api/graphql
|
|
```
|
|
|
|
## Keys
|
|
|
|
| Key | Action |
|
|
| --- | --- |
|
|
| `h` / `l` | Focus the thread list / thread detail |
|
|
| `j` / `k` | Move between threads or scroll the focused detail |
|
|
| `g` / `G` | First / last item |
|
|
| `enter` / `l` | Open a PR |
|
|
| `enter` | Toggle the selected review thread |
|
|
| `za` | Toggle the selected thread |
|
|
| `ctrl-d` / `ctrl-u` | Scroll thread detail or page through lists |
|
|
| `tab` | Hide or reveal the thread list |
|
|
| `b` / `esc` | Return to the PR picker |
|
|
| `r` | Refresh now |
|
|
| `q` | Quit |
|
|
|
|
## Current scope
|
|
|
|
The application is intentionally read-only. GitHub's GraphQL API currently
|
|
limits this client to the first 100 review threads and first 100 comments per
|
|
thread; the UI warns when the thread list is truncated. Markdown in comments is
|
|
displayed as readable wrapped text rather than fully rendered Markdown.
|