mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 11:20:45 +00:00
Update pr-description regex (#1181)
## Description: Update pr-description regex to better handle `#` characters in the description. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
## Description:
|
||||
|
||||
Describe the PR.
|
||||
|
||||
## Please complete the following:
|
||||
|
||||
- [ ] I have added screenshots for all UI updates
|
||||
@@ -10,4 +12,4 @@
|
||||
|
||||
## Please put your Discord username so you can be contacted if a bug or regression is found:
|
||||
|
||||
<DISCORD USERNAME>
|
||||
DISCORD_USERNAME
|
||||
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
const errors = [];
|
||||
|
||||
// Check for ## Description section
|
||||
const descMatch = body.match(/^## Description:\s*\n((?:(?!^#).*\n?)*)/m);
|
||||
const descMatch = body.match(/^## Description:\s*\n([\s\S]*?)(?:^## |\Z)/m);
|
||||
if (!descMatch || descMatch[1].trim().length < 20) {
|
||||
errors.push('❌ Missing or short `## Description:` section.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user