Skip to content

feat: request backport approval for semver/major and semver/minor PRs - #417

Merged
dsanders11 merged 3 commits into
mainfrom
feat/request-backport-approval-semver-labels
Aug 5, 2026
Merged

dsanders11 merged 3 commits into
mainfrom
feat/request-backport-approval-semver-labels

Conversation

@claude

@claude claude Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Niklas Wenzel · Slack thread

Before

When trop created a backport PR (or saw a manual backport opened), it only requested backport approval — adding the backport/requested 🗳 label and notifying the releases WG — when isSemverMinorPR() returned true. That predicate matched a title starting with feat: or a literal semver-minor label. Since Electron's real labels are semver/minor and semver/major, the label branch never matched in practice, so only PRs literally titled feat: ... got an approval request. Breaking changes (feat!:, chore!:) and semver/major-labeled PRs slipped through — for example electron/electron#52667 (backport of electron/electron#52351) merged without an approval request.

After

Backport approval is requested whenever the PR being backported:

  • has the semver/major label, or
  • has the semver/minor label, or
  • has a title starting with feat:, or
  • has a title starting with feat!:.

The unused legacy semver-minor label check has been dropped entirely.

How

isSemverMinorPR() in src/utils.ts is replaced by shouldRequestBackportApproval(), which checks the feat: / feat!: title prefixes and then checks the PR's labels (via labelExistsOnPR) against SEMVER_LABELS.MINOR and SEMVER_LABELS.MAJOR. Both call sites — the automatic backport path in backportImpl() and the manual backport path in updateManualBackport() — now use the new predicate; no other code consumed the old one. New unit tests in spec/utils.spec.ts cover the semver/major and semver/minor labels, feat: and feat!: titles, and a negative chore: case.

@claude
claude Bot marked this pull request as ready for review August 5, 2026 17:21
@claude
claude Bot requested a review from a team as a code owner August 5, 2026 17:21
@dsanders11
dsanders11 merged commit 7d64498 into main Aug 5, 2026
7 checks passed
@dsanders11
dsanders11 deleted the feat/request-backport-approval-semver-labels branch August 5, 2026 21:55
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.

3 participants