Repository navigation
fix: report no_ci instead of pending forever for PRs without CI - #17
Conversation
Copying PR URLs into `prw watch` one by one was the main friction in day-to-day use. `prw watch --mine` and `prw watch --review-requested` subscribe to a GitHub search (author:@me / review-requested:@me, open, non-archived) instead of a fixed list: - Matches are added right away and tagged with their source; `prw run` (and `run --once`) re-runs the searches every 5 minutes, picking up subscriptions enabled while it is running. - Review-request PRs are dropped when the request goes away; "mine" PRs are left for `prw run` to notify about and drop when merged or closed. Incomplete or failed searches never remove anything. - PRs watched by hand are never touched; watching an auto-added PR by hand claims it. `prw unwatch --mine` disables the source and removes only the PRs it added. - `prw list` shows auto-watch and an ADDED BY column (`source` in --json); `prw config show` shows auto_watch. Also compare owner/repo case-insensitively, as GitHub does, so search results can't duplicate PRs watched with different casing. Verified live: 18 open PRs across 7 repos found and CI-checked, then cleanly removed by `unwatch --mine`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A PR with no checks or statuses at all was reported as "pending" indefinitely, so `prw wait` and the MCP wait_for_ci tool blocked until their timeout on repositories without CI or on stacked PRs whose base branch runs none (14 of 18 real PRs in testing). Zero checks is also what every PR looks like right after a push, so a PR is only reported as no_ci once it has had no checks or statuses and hasn't been updated (PR updated_at, which every push bumps) for 3 minutes; a zero/unknown updated_at keeps it pending. - github: PullRequest.UpdatedAt, StateNoCI, ApplyNoCI, applied by run, wait and broadcast. - prw wait exits 4 for no_ci (not 0: `prw wait && deploy` must not deploy unverified PRs); MCP summaries and tool descriptions cover it. - prw run doesn't notify on a transition into no_ci, and notifies normally if CI shows up later. Verified live: 11 real PRs moved from pending to no_ci; `prw wait` on one returns in 2s with exit 4 instead of waiting 30 minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3880378d90
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if previousState != "" && previousState != currentState && currentState != github.StateNoCI && | ||
| shouldNotify(w.config.NotificationFilter, currentState) { |
There was a problem hiding this comment.
Keep no-CI state through metadata-only updates
When a watched PR is already no_ci, any comment, label change, or other metadata update refreshes updated_at; ApplyNoCI then temporarily returns pending with zero checks. With the default change filter, this condition emits a misleading no_ci → pending notification and stores pending, even though no CI has appeared; three minutes later it silently returns to no_ci. Preserve no_ci while the grace-period result still has zero checks, so a notification occurs only when an actual status or check run appears.
Useful? React with 👍 / 👎.
Description
A PR with no checks or statuses at all was reported as
pendingforever, soprw waitand the MCPwait_for_citool blocked until their timeout on repositories without CI, or on stacked PRs whose base branch runs none. Found while testing #16: 14 of 18 of my real open PRs were in this state.The rule
Zero checks is also what every PR looks like right after a push, while CI registers. So a PR becomes
no_cionly when it has no checks or statuses and itsupdated_at(bumped by every push) is at least 3 minutes old. A comment or label also bumpsupdated_at, which only delays the conclusion, never makes it early. An unknown/zeroupdated_atkeepspending.Changes
github:PullRequest.UpdatedAt,StateNoCI,NoCIGracePeriod(3m),ApplyNoCI, used byrun,waitandbroadcast.prw wait: new exit code 4 forno_ci— deliberately not 0, soprw wait && deploydoesn't deploy a PR no CI looked at.prw run: no notification on a transition intono_ci(it's not a CI result; it would ping once per such PR); normal notification if CI appears later (e.g. after a retarget).no_ciso agents stop waiting.no_ci(only reachable viabroadcast).Testing
waitstopping onno_civs waiting through a fresh push, exit code 4 through the command.run --onceover my 15 open PRs → 11no_ci, 2failure, 2success, 0 notifications.prw waiton fix: safe concurrent config writes, isolated tests, auto-drop merged/closed PRs #9 (no CI) returns in 2s with exit 4 instead of waiting 30 minutes.Checklist
go test -race ./...passesgo vet ./...passes🤖 Generated with Claude Code