From ff0e04e0c6e62c0707668d90da1db03cdb6c2967 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Sun, 15 Jun 2025 23:12:36 -0400 Subject: [PATCH] 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> --- .github/PULL_REQUEST_TEMPLATE.md | 4 +++- .github/workflows/pr-description.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c7c8c0124..3c6fd82cd 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -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 diff --git a/.github/workflows/pr-description.yml b/.github/workflows/pr-description.yml index 292134f60..fe4c3acf7 100644 --- a/.github/workflows/pr-description.yml +++ b/.github/workflows/pr-description.yml @@ -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.'); }