@devries-cameron20 / t3code-1 / commits / 783581d461
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(ci): fork PRs now resolve in workflow_run PR lookups (#26779)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Oct 28, 2026 at 19:15 UTC 783581d461dc72cdd8f78fc8abb4ad536dfc4547
2 files changed +23 -17
.github/workflows/desktop-macos-preview-publish.yml
+11 -8
@@ -77,16 +77,19 @@ jobs:
77 return;
78 }
79
80 - // workflow_run.pull_requests is empty for fork PRs, so resolve the
81 - // PR from the built commit instead and require exactly one open PR
82 - // from the same head repository and branch. The build baked its
80 + // workflow_run.pull_requests and the commit-to-PR lookup are both
81 + // empty for fork PRs, so list open PRs by head owner and branch
82 + // and require exactly one at the built commit. The build baked its
83 // PR number into the version, so two candidates would mean the
84 // asset name could belong to either.
85 - const associated = await github.paginate(
86 - github.rest.repos.listPullRequestsAssociatedWithCommit,
87 - { owner, repo, commit_sha: run.head_sha, per_page: 100 },
88 - );
89 - const matching = associated.filter(
85 + const open = await github.paginate(github.rest.pulls.list, {
86 + owner,
87 + repo,
88 + state: "open",
89 + head: `${run.head_repository?.owner?.login}:${run.head_branch}`,
90 + per_page: 100,
91 + });
92 + const matching = open.filter(
93 (candidate) =>
94 candidate.state === "open" &&
95 candidate.head.sha === run.head_sha &&
.github/workflows/mobile-fingerprint-label.yml
+12 -9
@@ -53,15 +53,18 @@ jobs:
53 return;
54 }
55
56 - // workflow_run.pull_requests is empty for fork PRs, so resolve the
57 - // PR from the checked commit. Requiring the PR's current head to be
58 - // that commit keeps a slow run for an older push from overwriting a
59 - // newer result.
60 - const associated = await github.paginate(
61 - github.rest.repos.listPullRequestsAssociatedWithCommit,
62 - { owner, repo, commit_sha: run.head_sha, per_page: 100 },
63 - );
64 - const matching = associated.filter(
56 + // workflow_run.pull_requests and the commit-to-PR lookup are both
57 + // empty for fork PRs, so list open PRs by head owner and branch.
58 + // Requiring the PR's current head to be the checked commit keeps a
59 + // slow run for an older push from overwriting a newer result.
60 + const open = await github.paginate(github.rest.pulls.list, {
61 + owner,
62 + repo,
63 + state: "open",
64 + head: `${run.head_repository?.owner?.login}:${run.head_branch}`,
65 + per_page: 100,
66 + });
67 + const matching = open.filter(
68 (candidate) =>
69 candidate.state === "open" &&
70 candidate.head.sha === run.head_sha &&