Skip to content

ci: Relabel pull requests on every edit - #265

Merged
RobinBol merged 1 commit into
masterfrom
fix/label-pr-edit-race
Oct 28, 2026
Merged

RobinBol merged 1 commit into
masterfrom
fix/label-pr-edit-race

Conversation

@RobinBol

Copy link
Copy Markdown
Collaborator

What

label-pr.yml now reconciles the label on every pull request edit, not only when the title or base branch changes.

Why

The concurrency group keeps one queued run per pull request, and a newer queued run replaces the older one. Edit the title and then the body before the first run finishes, and only the body-edit run is left. It returned early, so the label of the old title stayed, which can put a fix under internal and leave it out of the release notes.

How

Drop the early return. The run already reads the live pull request, so each run sets the label from the current title and base. That costs one extra API call per edit.

A newer queued run in the concurrency group replaces an older one, so a title edit
followed quickly by a body edit left only the body run, which returned early and kept
the label of the old title.
@RobinBol RobinBol changed the title ci: relabel pull requests on every edit ci: Relabel pull requests on every edit Oct 28, 2026
@RobinBol RobinBol self-assigned this Oct 28, 2026
@github-actions github-actions Bot added the internal Tooling, CI or docs, left out of the release notes label Oct 28, 2026
@RobinBol
RobinBol requested a balanced review from Copilot October 28, 2026 14:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the change to reconcile release-note labels on every pull request edit.

No open issues 🎉

What changed in this PR

This PR prevents stale release-note labels when a body edit replaces a queued title-edit run. Every pull request edit now reconciles labels using the current title and base branch.

Changes:

  • Removes the early return that skipped edits unrelated to the title or base branch.
  • Updates workflow comments to explain the concurrency behavior.
File Description
.github/​workflows/​label-pr.yml Reconciles labels on every edit to prevent stale release-note categorization.

Review effort: Balanced

@RobinBol
RobinBol marked this pull request as ready for review October 28, 2026 14:58
@RobinBol
RobinBol merged commit 2add8be into master Oct 28, 2026
5 checks passed
@RobinBol
RobinBol deleted the fix/label-pr-edit-race branch October 28, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Tooling, CI or docs, left out of the release notes

Development

Successfully merging this pull request may close these issues.

2 participants