-
-
Notifications
You must be signed in to change notification settings - Fork 16
Fix issue-labeler patterns to use portable cross-line matching #800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,21 @@ | ||
| # Configuration for github/issue-labeler - body-based labels | ||
| # See: https://github.com/github/issue-labeler | ||
| # Uses regex patterns to match PR/issue body content | ||
| # All checkbox patterns require ## Type of change header first to avoid matching examples | ||
| # Checkbox patterns use (.|[\r\n])*? for cross-line matching ([\s\S] may not work in all engines) | ||
| --- | ||
| bug: | ||
| - '## Type of change[\s\S]*?- \[[xX]\]\s*[Bb]ugfix' | ||
| - '## Type of change(.|[\r\n])*?- \[[xX]\]\s*[Bb]ugfix' | ||
|
|
||
| enhancement: | ||
| - '## Type of change[\s\S]*?- \[[xX]\]\s*[Nn]ew [Ff]eature' | ||
| - '## Type of change(.|[\r\n])*?- \[[xX]\]\s*[Nn]ew [Ff]eature' | ||
|
|
||
| breaking-change: | ||
| # Checkbox in Type of change section | ||
| - '## Type of change[\s\S]*?- \[[xX]\]\s*[Bb]reaking [Cc]hange' | ||
| - '## Type of change(.|[\r\n])*?- \[[xX]\]\s*[Bb]reaking [Cc]hange' | ||
| # Breaking change section with content after HTML comment | ||
| - '^[\s\S]*?# Breaking change[\s\S]*?-->\s*\n+[A-Z][a-z]+[\s\S]*?## Proposed change' | ||
| - '# Breaking change(.|[\r\n])*?-->\s*\n+[A-Z][a-z]+(.|[\r\n])*?## Proposed change' | ||
| # Breaking change section with HTML comment removed | ||
| - '^[\s\S]*?# Breaking change\s*\n+[A-Z][a-z]+[\s\S]*?## Proposed change' | ||
| - '# Breaking change\s*\n+[A-Z][a-z]+(.|[\r\n])*?## Proposed change' | ||
|
||
|
|
||
| code-quality: | ||
| - '## Type of change[\s\S]*?- \[[xX]\]\s*[Cc]ode [Qq]uality' | ||
| - '## Type of change(.|[\r\n])*?- \[[xX]\]\s*[Cc]ode [Qq]uality' | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pattern
# Breaking changematches any line containing '# Breaking change', not just a section header. This could produce false positives if that text appears elsewhere in the PR body. The pattern should be anchored or more specific to match the actual section structure from the PR template.