Skip to content

fix(ci): replace auto backport sync with /update-backports command#2899

Merged
Saadnajmi merged 2 commits intomicrosoft:mainfrom
Saadnajmi:fix-backport-workflow-always-firing-v2
Apr 9, 2026
Merged

fix(ci): replace auto backport sync with /update-backports command#2899
Saadnajmi merged 2 commits intomicrosoft:mainfrom
Saadnajmi:fix-backport-workflow-always-firing-v2

Conversation

@Saadnajmi
Copy link
Copy Markdown
Collaborator

@Saadnajmi Saadnajmi commented Apr 8, 2026

Summary

  • Removes the automatic pull_request: synchronize trigger from the backport workflow, which was failing on every fork PR due to missing secrets
  • Adds a new /update-backports comment command that maintainers can use to explicitly sync backport PRs with the source PR
  • The update job reacts to the comment, finds linked backport PRs, re-cherry-picks commits, and posts a summary comment with results

Test plan

  • Push a commit to a fork PR — the "Update backport PRs" job should no longer appear
  • Comment /backport <branch> on a PR — the "Create backport" job should still work as before
  • Comment /update-backports on a PR with existing backport PRs — they should be re-synced
  • Comment /update-backports on a PR with no backport PRs — should get an informational comment

🤖 Generated with Claude Code

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 8, 2026

⚠️ No Changeset found

Latest commit: c339958

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Replace the automatic pull_request synchronize trigger with an explicit
/update-backports comment command. This prevents the workflow from
failing on fork PRs (which lack access to secrets) and gives maintainers
explicit control over when backport PRs are re-synced.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Saadnajmi Saadnajmi changed the title fix(ci): prevent backport update job from failing on every PR fix(ci): replace auto backport sync with /update-backports command Apr 9, 2026
@Saadnajmi Saadnajmi force-pushed the fix-backport-workflow-always-firing-v2 branch from 6d69c8d to b832618 Compare April 9, 2026 00:58
@Saadnajmi Saadnajmi marked this pull request as ready for review April 9, 2026 00:59
@Saadnajmi Saadnajmi requested a review from a team as a code owner April 9, 2026 00:59
@Saadnajmi Saadnajmi enabled auto-merge (squash) April 9, 2026 01:13
…iggered

- Remove automatic pull_request synchronize trigger that failed on fork
  PRs due to missing secrets
- Add /update-backports comment command to explicitly sync backport PRs
- Restrict both /backport and /update-backports to OWNER, MEMBER, and
  COLLABORATOR roles to prevent unauthorized users from triggering
  backport operations or force-pushing to branches

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Saadnajmi Saadnajmi merged commit 34828e2 into microsoft:main Apr 9, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants