Skip to content

chore: don't reapply the same label on every PR change#1035

Open
nirinchev wants to merge 3 commits intomainfrom
ni/label-pr-tweaks
Open

chore: don't reapply the same label on every PR change#1035
nirinchev wants to merge 3 commits intomainfrom
ni/label-pr-tweaks

Conversation

@nirinchev
Copy link
Copy Markdown
Collaborator

@nirinchev nirinchev commented Apr 10, 2026

Proposed changes

Skips reapplying the label if already have it to avoid polluting the history.

@nirinchev nirinchev requested a review from a team as a code owner April 10, 2026 13:40
@nirinchev nirinchev requested review from Copilot and fmenezes and removed request for a team April 10, 2026 13:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the PR-labeling GitHub Action to avoid reapplying the same type: ... label on every PR event, reducing unnecessary gh pr edit calls while keeping the “single type label” invariant.

Changes:

  • Fetch existing type: ... labels on the PR and remove only those that differ from the computed target label.
  • Add the computed label only if it is not already present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants