Skip to content

Commit 82d5267

Browse files
authored
Merge pull request #6 from codeGROOVE-dev/sprinkler
Add make build, update README
2 parents a9ad17e + e207e67 commit 82d5267

File tree

6 files changed

+27
-59
lines changed

6 files changed

+27
-59
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
# BEGIN: lint-install .
33
# http://github.com/codeGROOVE-dev/lint-install
44

5-
.PHONY: lint test
5+
.PHONY: lint test build
66
test:
77
go test -race ./...
88

9+
build:
10+
mkdir -p out
11+
go build -o out/prs .
12+
913
lint: _lint
1014

1115
LINT_ARCH := $(shell uname -m)

README.md

Lines changed: 16 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,35 @@
1-
# 🚀 prs
1+
# prs
22

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

5-
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.
5+
Designed to be easily used for embedded low-power displays, or your shell initialization.
66

7-
## Quick Start
7+
## Install
88

99
```bash
10-
go install github.com/ready-to-review/prs@latest
11-
prs
10+
go install github.com/codeGROOVE-dev/prs@latest
1211
```
1312

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

1615
## Usage
1716

1817
```bash
19-
# Show PRs you're involved with (filters out stale PRs)
20-
prs
21-
22-
# Only PRs waiting for your review
23-
prs --blocked
24-
25-
# Include old/stale PRs
26-
prs --include-stale
27-
28-
# Auto-refresh view
29-
prs --watch
30-
31-
# Get notified when PRs need attention
32-
prs --notify
18+
prs # PRs you're involved with
19+
prs --blocked # Only PRs waiting for you
20+
prs --include-stale # Include ancient PRs
21+
prs --watch # Live updates
22+
prs --exclude-orgs google # Skip an organization (comma-separated)
3323
```
3424

35-
## What You'll See
36-
37-
### Default View (`prs`)
3825
![Default View](media/default.png)
3926

40-
### Live Focus Mode (`prs --blocked --watch`)
41-
![Watch Blocked View](media/watch_blocked.png)
42-
43-
## Options
44-
45-
- `--blocked` - Only PRs blocking on you
46-
- `--include-stale` - Include old PRs (hidden by default)
47-
- `--watch` - Live updates with real-time WebSocket + polling
48-
- `--exclude-orgs` - Comma-separated list of organizations to exclude
49-
- `--verbose` - Show detailed logging
50-
51-
### Color Output
52-
53-
Colors are automatically adjusted based on your terminal capabilities. To disable colors entirely:
54-
55-
```bash
56-
NO_COLOR=1 prs
57-
```
58-
59-
This respects the [NO_COLOR](https://no-color.org/) standard.
60-
61-
## Status Icons
27+
![Watch Mode](media/watch_blocked.png)
6228

63-
- 🚧 Draft PR
64-
- ✅ Ready to merge
65-
- 👍 Has approval
66-
- 💥 Merge conflict
67-
- ⏰ Stale PR
68-
- ❌ Failing tests
69-
- 📝 Regular PR
29+
Colors disabled with `NO_COLOR=1`.
7030

71-
## Why This Tool?
31+
## Real-time support
7232

73-
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.
33+
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.
7434

75-
Built fast in Go because your development tools shouldn't slow you down.
35+
Without the app, PRs are updated every minute, which should be enough for anyone TBH.

main.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (t *prRefreshTracker) markRefreshed(prURL string) {
106106

107107
const (
108108
defaultTimeout = 30 * time.Second
109-
defaultWatchInterval = 90 * time.Second
109+
defaultWatchInterval = 60 * time.Second
110110
maxPerPage = 100
111111
retryAttempts = 3
112112
retryDelay = time.Second
@@ -1081,7 +1081,7 @@ func generatePRDisplay(prs []PR, username string, blockingOnly, verbose, include
10811081
}
10821082

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

11071107
for i := range outgoing {
1108+
if blockingOnly && !isBlockingOnUser(&outgoing[i], username) {
1109+
continue
1110+
}
11081111
output.WriteString(formatPR(&outgoing[i], username))
11091112
}
11101113
}

main_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package main
22

33
import (
4+
"strings"
45
"testing"
56
)
67

media/default.png

-273 KB
Loading

media/watch_blocked.png

-24.5 KB
Loading

0 commit comments

Comments
 (0)