Repository navigation
feat: your review requests and assignments sync (#366) - #408
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR sync keeps the Pull requests where your review is requested and those assigned to you beside the ones you authored. Each stores why it is yours, read from its author, review requests and assignees; an open one that is yours no way at all is Finished. They show in both Pull requests views and pr ls, and never alert. API_VERSION 28 adds PullRequest.yours. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #366
PR sync now keeps every Pull request that is yours: the ones you authored, the ones where your review is requested and the ones assigned to you, so everything waiting on you is in one place. Only the ones you authored alert.
What changes
is:pr is:open user-review-requested:@me sort:updated-descandis:pr is:open assignee:@me sort:updated-desc, each stored page by page and stopping at the age cutoff, as the list does. The incremental sync runs oneupdated:>=Tsearch per way a PR is yours (author, review requested, assigned). The age cutoff applies to all of them, in both kinds of sync.authored,review_requestedandassigned(migration0003; every PR kept before is markedauthored). Every read of a PR (the list's light fields, each search, each fetch by number) reads its author, review requests and assignees, and every query for PRs asks forviewer { login }beside them, so they're matched against the token's login with no extra request. The rule isagentdeck_core::why_yours.pr lsthrough the existing rows.GET /v1/prsandpr ls --jsoncarryyourson eachPullRequest. They never alert: the alert rule from Pull request alerts follow the new model #363 (author is the signed-in login) is unchanged, and a GUI test now pins it for reviewer and assignee PRs.API_VERSION28:PullRequest.yours.openapi.jsonand the client are regenerated, andYoursis a core type shared with the client. An older daemon sends noyours, which the client reads as empty.docs/spec.md§3 (columns, migration, Pull request, Finished), §4 (yours,API_VERSION28), §8 (Whose PRs, full and incremental searches, the re-fetch, Finished, progress, cost), §10 (pr ls) and §12 (tests) are rewritten to match.What a sync costs now
reviewRequests(first: 50)andassignees(first: 10)make a list or search page 2 GraphQL points and a fetch 1. That's about 210 points an hour, out of 5,000.Deviation from the ticket
user-review-requested:@me, notreview-requested:@me. The latter also finds requests to a team you're on. A team's request names no login inreviewRequests, so when the sync reads such a PR back (a fetch by number, the incremental re-fetch) it would count it as not yours and mark it Finished, then bring it back at the next search, over and over. The user-only qualifier finds exactly what why-yours can read. Team requests are tracked in Review requests to your teams sync as yours #407.Tests
GET /v1/prs. Also: the age cutoff on review requests and assignments in both kinds of sync; a submitted review → Finished at the next incremental sync; an unassignment → Finished at a full sync; an authored PR whose review request goes stays unfinished; deletion after the shortened window, with its Repository; a PR yours again stops being Finished; and a migration test for0003. I checked that 8 of the new tests fail with the searches, the re-fetch and the Finished rule reverted.pr lsandpr ls --jsonwithyours.why_yours, the parsers reading review requests, assignees and team requests, the search queries, the incremental re-fetch rule and the progress tally.🤖 Generated with Claude Code