ci: tolerate CRLF line endings in pr-issue-check#329
Closed
along-2017 wants to merge 1 commit into
Closed
Conversation
The ## Issues section detector matched `^##[ \t]+Issues[ \t]*\n`, which requires a bare LF after the heading. GitHub stores PR bodies with CRLF line endings (web UI edits and bot edits such as automated summaries), so on those bodies the `\r` before the `\n` made the regex miss the section and the check failed with "PR body is missing a visible ## Issues section" even when a valid `Closes #NNN` reference was present. Normalize the body's newlines to LF once before matching. This fixes the false negative without loosening any of the reference, NO-REF, disallowed tracker, or disallowed URL checks. Signed-off-by: along <along@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR issue checker now normalizes CRLF and CR line endings to LF before matching the visible ChangesIssue checker
Estimated code review effort: 2 (Simple) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Contributor
|
I think this check was removed from main and we are now using coderabbit for this. |
sbaum1994
approved these changes
Jul 23, 2026
Contributor
|
Closing per balaji's comment |
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.
TL;DR
Fixes a false negative in the
pr-issue-checkgate: a PR with a valid## Issuesreference fails when its body uses CRLF line endings. The section detector required a bare LF after the## Issuesheading, but GitHub stores PR bodies with CRLF (web UI edits and bot edits such as automated summaries), so the\rmade the regex miss the section and report it missing. The fix normalizes the body to LF before matching.Additional Details
NO-REF, disallowed-tracker, and disallowed-URL checks are untouched.Closes #NNNstill fails withPR body is missing a visible ## Issues sectionafter a bot rewrites the description with CRLF.For the Reviewer
## Issuesregex inci/check-pr-issue.sh.For QA
ci/check-pr-issue.shagainst CRLF and LF bodies: CRLF withCloses #NNNnow passes and LF still passes, while the negative cases (no## Issuessection, section with no reference,NO-REF, and a disallowed Jira key) all still behave as before.Issues
NO-REF
Checklist
Summary by CodeRabbit