Fix release notes linter failing on LF-only and multi-line PR bodies - #2300
Open
IrvingMg wants to merge 1 commit into
Open
Fix release notes linter failing on LF-only and multi-line PR bodies#2300IrvingMg wants to merge 1 commit into
IrvingMg wants to merge 1 commit into
Conversation
The release-note regex required CRLF line endings and a single-line note, so PRs whose body uses LF (created via the API or gh CLI) or whose note spans several lines (e.g. "action required" followed by a list) failed even with a valid block. Strip CRs before matching so both styles are accepted, allow multi-line notes while still requiring at least one non-blank line, drop the stale template check that no longer matches the PR template text, and fetch the PR body once. Signed-off-by: Irving Mondragón <mirvingr@gmail.com>
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
4 tasks
Member
|
the please check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
The release-notes-linter regex required CRLF line endings and a single-line note, so PRs whose body uses LF (edited via the API or
ghCLI) or whose release note spans several lines (e.g.action requiredfollowed by a bullet list) failed despite a validrelease-noteblock. This is currently failing on #2195 (LF-onlyNONE) and #2187 (multi-lineaction required).\rbefore matching so both CRLF and LF bodies passVerified by running the workflow's script locally against the bodies of #2187, #2195 and #2292 (pass) and a body without a block (fail). Same fix as shipwright-io/cli#406, extended for multi-line notes.
Developed with the assistance of Claude (Anthropic); reviewed by the author.
Related Issue
N/A
Type of PR
/kind bug
Submitter Checklist
See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.
Release Notes