Repository navigation
Fix Fork Pull Request Preview Discovery - #1171
Merged
Merged
Conversation
CryZe
force-pushed
the
pull-request-preview-discovery
branch
from
October 12, 2026 20:48
6f5b3d7 to
7f605bc
Compare
GitHub can return no commit associations for an open fork pull request, even when its current head matches successful CI and the preview artifact is available. Discover candidates by listing current open pull request heads instead so fork and draft previews can be found without those associations. Keep discovery based on GitHub API metadata, require exactly one matching repository and head SHA, and recheck the selected pull request before using its artifact. Preserve pagination and the existing rejection of stale, closed, ambiguous, or unrelated builds.
CryZe
force-pushed
the
pull-request-preview-discovery
branch
from
October 12, 2026 20:51
7f605bc to
f78eb12
Compare
CryZe
marked this pull request as ready for review
October 12, 2026 20:52
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.
Draft PR #1170 completed CI successfully and uploaded its preview artifact, but GitHub's commit-association API returned no PRs for the fork commit. The publisher consequently skipped deployment even though the current open PR's head matched the completed run.
List current open pull request heads directly and select the one matching the CI repository and head SHA. Keep pagination, require exactly one candidate, and fetch the selected PR again before using its artifact. The existing checks for closed, stale, ambiguous, and unrelated builds remain intact, and artifact files never supply PR identity.
Add regression coverage for a draft fork PR with empty commit associations and for unrelated open heads. All 17 helper tests, ESLint, strict TypeScript checks, and formatting checks pass.
A read-only diagnostic against the original live CI run verified that the updated helper selects PR #1170, its exact current head SHA, and artifact
11772036485. The temporary diagnostic workflow has been removed from the final change. Once this is on the default branch, rerun #1170's publisher to finish verifying Cloudflare upload and the PR conversation link.