Skip to content

Commit 6d69c8d

Browse files
Saadnajmiclaude
andcommitted
fix(ci): skip backport update job on fork PRs
Fork PRs don't have access to repository secrets, so the GitHub App token generation fails and shows a red X on every fork PR. Skip the update-backport job entirely when the PR comes from a fork, since it cannot function without the app token anyway. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent aed8d67 commit 6d69c8d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/microsoft-backport.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,10 @@ jobs:
194194
# ─── Job 2: Auto-update backport PRs when source PR is updated ───
195195
update-backport:
196196
name: Update backport PRs
197-
if: github.event_name == 'pull_request' && github.event.action == 'synchronize'
197+
if: >
198+
github.event_name == 'pull_request' &&
199+
github.event.action == 'synchronize' &&
200+
github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
198201
runs-on: ubuntu-latest
199202
permissions:
200203
contents: write

0 commit comments

Comments
 (0)