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:
Scott Anderson
2025-06-15 23:12:36 -04:00
committed by GitHub
parent 3894945adf
commit ff0e04e0c6
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -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
+1 -1
View File
@@ -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.');
}