Skip to content

Commit e207e67

Browse files
committed
Change default watch interval to 60s, fix display bug, README
1 parent 343bb5c commit e207e67

File tree

4 files changed

+17
-24
lines changed

4 files changed

+17
-24
lines changed

README.md

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,35 @@
11
# prs
22

3-
GitHub PR filtering for people who don't have time for GitHub's nonsense.
3+
GitHub CLI tool that shows which PRs that are actually waiting on you. That's it.
44

5-
Shows only PRs that are actually waiting on you. That's it.
5+
Designed to be easily used for embedded low-power displays, or your shell initialization.
66

77
## Install
88

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

1313
Requires Go 1.23+ and `gh` auth.
1414

1515
## Usage
1616

1717
```bash
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
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)
2223
```
2324

2425
![Default View](media/default.png)
2526

2627
![Watch Mode](media/watch_blocked.png)
2728

28-
## Flags
29-
30-
```
31-
--blocked PRs blocking on you
32-
--include-stale Show old garbage too
33-
--watch Real-time updates via WebSocket
34-
--exclude-orgs Skip organizations (comma-separated)
35-
--verbose More noise
36-
```
37-
3829
Colors disabled with `NO_COLOR=1`.
3930

40-
## Status
41-
42-
Draft, ready, approved, conflicted, stale, failing, or regular. You'll figure it out.
31+
## Real-time support
4332

44-
## Why
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.
4534

46-
Because clicking through GitHub tabs is for people with too much time.
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/watch_blocked.png

-24.5 KB
Loading

0 commit comments

Comments
 (0)