Repository navigation
feat(prs): linked Repositories stay current; follow a rename whose old name was taken (#362, #390) - #409
Merged
Conversation
…390) A full sync reads by id every linked Repository no PR showed, and the Repository of a PR that left the list and wasn't found under its last known name. A rename is followed, lost access marks it Unreachable with its Links kept, and GitHub showing it again clears the mark. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#362) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 #362
Closes #390
Linked Repositories now stay current without a Pull request to carry them, and a renamed Repository whose old name another repository took no longer leaves its PRs Unreachable.
What changes
Repositories read by id (full sync only). GraphQL has no lookup by a Repository's GitHub id, so a full sync reads one with REST
GET /repositories/{id}, 4 at a time, with the same token, timeout, retries and wording as the other REST calls. It reads:No Repository is asked about twice in one sync.
Unreachable. A 404, a 451, or a 403 that isn't a rate limit (an organisation's SSO or OAuth app restrictions) marks the Repository Unreachable. It keeps its Links, its PRs and its last known facts. When GitHub shows it again, by id or with any PR, the mark is cleared. A PR whose Repository GitHub doesn't show by id is marked Unreachable with it. Each change sends
changed repository.Pull requests views. An Unreachable Repository's group header reads "Unreachable: can't sync, PRs may be out of date" in place of the Workspace names, on both the Pull requests view and a Workspace's Pull requests. The group keeps its place among the linked groups and keeps its group menu.
repo lsalready marked(unreachable)(andunreachablein--json). Now something sets the mark, and a CLI test covers it.No route, field or message changed, so
API_VERSIONstays as it is.What a sync costs
Deviation from the brief
#390's fix says to resolve the Repository by id before fetching by number. This PR resolves it only when that fetch misses, then fetches again under the new name. The outcome is the same, and the common case costs nothing: a merged PR whose Repository wasn't renamed is found by the first fetch, so no REST call is made.
Spec and design
docs/spec.md§3, §8 (Repositories read by id, Unreachable, cost), §10 (repo ls), §11 (the header) and §12 (tests) are rewritten.Tests
changed repository;repo lstext and--jsonafter apr syncfound the Repository Unreachable.🤖 Generated with Claude Code