Skip to content

Add needs-release-note label for PRs without release notes#535

Merged
gjkim42 merged 1 commit intomainfrom
kelos-task-530
Mar 4, 2026
Merged

Add needs-release-note label for PRs without release notes#535
gjkim42 merged 1 commit intomainfrom
kelos-task-530

Conversation

@kelos-bot
Copy link

@kelos-bot kelos-bot bot commented Mar 3, 2026

/kind feature

What type of PR is this?

Feature: Automatically sync release-note labels for PRs based on release note content.

What this PR does / why we need it:

Extends the Label workflow (.github/workflows/label.yaml) to automatically manage release-note labels on PRs based on the content of the release-note fenced block in their body. When the PR body is edited, labels are re-evaluated.

Changes:

  • Added edited to pull_request_target event types so the workflow re-evaluates when a PR body is modified
  • Added release-note block detection logic that parses the PR body for the ```release-note fenced block
  • Adds release-note label when the block contains a non-empty, non-NONE release note
  • Adds release-note-none label when the block explicitly contains "NONE" (case-insensitive)
  • Adds needs-release-note label when the block is missing or empty
  • Removes stale release-note labels when the PR body is edited

Which issue(s) this PR is related to:

Closes #530

Special notes for your reviewer:

The release-note check only applies to PRs (not issues), matching the same parsing approach used by hack/release-notes/main.go. The regex /\``release-note\s*\n([\s\S]*?)```/` matches the fenced block and checks content to determine which label to apply.

Does this PR introduce a user-facing change?

NONE

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/label.yaml">

<violation number="1" location=".github/workflows/label.yaml:71">
P1: Release-note check is unreachable when any label-sync rule fails. The `throw` on the preceding line aborts the script before this code runs. Move the release-note block before the aggregated error throw (or into its own try/catch) so it always executes independently.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Collaborator

@gjkim42 gjkim42 left a comment

Choose a reason for hiding this comment

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

label "release-note" to the PR that has a release note.
and label "release-note-none" to the PR that explicitly set "none"(case insensitively) to the PR.

and needs-release-note should be set if either of it does not present
/reset-worker

Copy link
Collaborator

@gjkim42 gjkim42 left a comment

Choose a reason for hiding this comment

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

lgtm
/squash-commits

…or PRs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kelos-bot kelos-bot bot force-pushed the kelos-task-530 branch from ce205c6 to 40a1adc Compare March 3, 2026 13:56
@gjkim42 gjkim42 merged commit b0ba62a into main Mar 4, 2026
6 checks passed
@gjkim42 gjkim42 deleted the kelos-task-530 branch March 4, 2026 13:34
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.

label needs-release-note if there's no release note for PR

1 participant