Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
# BEGIN: lint-install .
# http://github.com/codeGROOVE-dev/lint-install

.PHONY: lint test
.PHONY: lint test build
test:
go test -race ./...

build:
mkdir -p out
go build -o out/prs .

lint: _lint

LINT_ARCH := $(shell uname -m)
Expand Down
72 changes: 16 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,35 @@
# 🚀 prs
# prs

> Only shows PRs waiting on YOU
GitHub CLI tool that shows which PRs that are actually waiting on you. That's it.

A fast CLI that filters GitHub PRs to show only what needs your attention. No more digging through dozens of PRs to find the ones that actually need you.
Designed to be easily used for embedded low-power displays, or your shell initialization.

## Quick Start
## Install

```bash
go install github.com/ready-to-review/prs@latest
prs
go install github.com/codeGROOVE-dev/prs@latest
```

**Requirements:** Go 1.23+ and GitHub CLI (`gh`) authenticated
Requires Go 1.23+ and `gh` auth.

## Usage

```bash
# Show PRs you're involved with (filters out stale PRs)
prs

# Only PRs waiting for your review
prs --blocked

# Include old/stale PRs
prs --include-stale

# Auto-refresh view
prs --watch

# Get notified when PRs need attention
prs --notify
prs # PRs you're involved with
prs --blocked # Only PRs waiting for you
prs --include-stale # Include ancient PRs
prs --watch # Live updates
prs --exclude-orgs google # Skip an organization (comma-separated)
```

## What You'll See

### Default View (`prs`)
![Default View](media/default.png)

### Live Focus Mode (`prs --blocked --watch`)
![Watch Blocked View](media/watch_blocked.png)

## Options

- `--blocked` - Only PRs blocking on you
- `--include-stale` - Include old PRs (hidden by default)
- `--watch` - Live updates with real-time WebSocket + polling
- `--exclude-orgs` - Comma-separated list of organizations to exclude
- `--verbose` - Show detailed logging

### Color Output

Colors are automatically adjusted based on your terminal capabilities. To disable colors entirely:

```bash
NO_COLOR=1 prs
```

This respects the [NO_COLOR](https://no-color.org/) standard.

## Status Icons
![Watch Mode](media/watch_blocked.png)

- 🚧 Draft PR
- ✅ Ready to merge
- 👍 Has approval
- 💥 Merge conflict
- ⏰ Stale PR
- ❌ Failing tests
- 📝 Regular PR
Colors disabled with `NO_COLOR=1`.

## Why This Tool?
## Real-time support

Stop context switching through GitHub tabs. This tool uses smart filtering to show only PRs that actually need your input - not PRs waiting on CI, other reviewers, or ones you've already reviewed.
Due to GitHub webhook limitations, real-time updates are only available for GitHub orgs that install the [Ready to Review](https://github.com/apps/ready-to-review-beta) GitHub app.

Built fast in Go because your development tools shouldn't slow you down.
Without the app, PRs are updated every minute, which should be enough for anyone TBH.
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (t *prRefreshTracker) markRefreshed(prURL string) {

const (
defaultTimeout = 30 * time.Second
defaultWatchInterval = 90 * time.Second
defaultWatchInterval = 60 * time.Second
maxPerPage = 100
retryAttempts = 3
retryDelay = time.Second
Expand Down Expand Up @@ -1081,7 +1081,7 @@ func generatePRDisplay(prs []PR, username string, blockingOnly, verbose, include
}

// Outgoing PRs with integrated header
if len(outgoing) > 0 && !blockingOnly {
if len(outgoing) > 0 && (!blockingOnly || outgoingBlockingCount > 0) {
if len(incoming) > 0 {
output.WriteString("\n")
}
Expand All @@ -1105,6 +1105,9 @@ func generatePRDisplay(prs []PR, username string, blockingOnly, verbose, include
output.WriteString(":\n")

for i := range outgoing {
if blockingOnly && !isBlockingOnUser(&outgoing[i], username) {
continue
}
output.WriteString(formatPR(&outgoing[i], username))
}
}
Expand Down
1 change: 1 addition & 0 deletions main_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"strings"

Check failure on line 4 in main_test.go

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

"strings" imported and not used
"testing"
)

Expand Down
Binary file modified media/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified media/watch_blocked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading