Skip to content

Fix release notes linter failing on LF-only and multi-line PR bodies - #406

Open
IrvingMg wants to merge 1 commit into
shipwright-io:mainfrom
IrvingMg:fix/release-notes-linter-line-endings
Open

Fix release notes linter failing on LF-only and multi-line PR bodies#406
IrvingMg wants to merge 1 commit into
shipwright-io:mainfrom
IrvingMg:fix/release-notes-linter-line-endings

Conversation

@IrvingMg

@IrvingMg IrvingMg commented Aug 23, 2026

Copy link
Copy Markdown
Member

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 gh CLI) or whose release note spans several lines (e.g. action required followed by a bullet list) failed despite a valid release-note block.

  • Strip \r before matching so both CRLF and LF bodies pass
  • Allow multi-line notes, still requiring at least one non-blank line
  • Remove the stale "template left as-is" check (its text no longer exists in the template)
  • Fetch the PR body once

Verified by running the workflow's script locally against the bodies of recent PRs. Same fix as shipwright-io/build#2300.

Developed with the assistance of Claude (Anthropic); reviewed by the author.

Related Issue

Related to #405

Type of PR

/kind bug

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Kind label has been set
  • Release notes block has been filled in, or marked NONE

See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.

Release Notes

NONE

@openshift-ci openshift-ci Bot added kind/bug Categorizes issue or PR as related to a bug. release-note-none labels Aug 23, 2026
@pull-request-size pull-request-size Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 23, 2026
@openshift-ci

openshift-ci Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign qu1queee for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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>
@IrvingMg
IrvingMg force-pushed the fix/release-notes-linter-line-endings branch from 92cffaf to 20c5f55 Compare August 23, 2026 01:19
@IrvingMg IrvingMg changed the title Fix release notes linter failing on LF-only PR bodies Fix release notes linter failing on LF-only and multi-line PR bodies Aug 23, 2026
@IrvingMg

Copy link
Copy Markdown
Member Author

PR to fix E2E Tests check: #407

@kaizakin kaizakin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same as shipwright-io/build#2300 (comment)

should we add a comment to the PR template saying we support multi-line release notes once this is merged @IrvingMg ?

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

Labels

kind/bug Categorizes issue or PR as related to a bug. release-note-none size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants