Repository navigation
fix(hub): keep a policy read going when listing branches or the refresh fails - #767
Merged
Merged
Conversation
TheGreatAxios
marked this pull request as ready for review
October 29, 2026 16:05
Contributor
|
Triage: Pass No changes needed from you. A maintainer will review this pull request. Notes:
|
Contributor
There was a problem hiding this comment.
Adds a pullUnread flag to the policy file response so that when the open policy pull request cannot be listed or its branch copy cannot be read, the default branch file is returned instead of reporting "no pull request". It also stops an opened policy pull request from becoming an error when the follow-up listing refresh fails, logging the refresh failure and returning the opened pull request.
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.
The policy file read no longer fails when the open policy pull request cannot be listed or its branch copy cannot be read. It returns the default branch's file with
pullUnread: true, so "could not check" is no longer shown as "no pull request". A repository the shared listing does not cover is asked of the host directly; if that read fails it ispullUnreadtoo. A refused listing or an error row ispullUnreadas before. Opening a policy pull request no longer turns into an error when the listing refresh afterwards fails: the refresh failure is logged and the opened pull request is returned.policy-file.ts(pullCopy,opened), which both GitHub and Bitbucket Data Center records go through, so one fix covers both hosts. The files named in the issue do not hold this path.pullUnread; older clients ignore it. It is documented in docs/ARCHITECTURE.md and the route's OpenAPI description.policy-file.postgres.test.tscovers a listing that throws, a branch read that fails, a repository the listing omits (asked of the host, and unread when that fails) and a refresh that fails after opening.bun run checkandbun run lintpass (existing warnings only).Closes CL-11706