From fe2df7850b27ec10bf370063247e34709838150d Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Wed, 9 Oct 2024 11:55:53 +0100 Subject: [PATCH] chore: add validation for PR description and checklist --- .github/scripts/validate_pr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/validate_pr.py b/.github/scripts/validate_pr.py index 7bd22473fe..8b57f2296b 100644 --- a/.github/scripts/validate_pr.py +++ b/.github/scripts/validate_pr.py @@ -23,8 +23,8 @@ # Print the PR body for debugging (optional) print("PR Body:", pr_body) -# Check for 'Proposed changes' section -proposed_changes_match = re.search(r"### Proposed changes\s*(.+?)\s*(### Checklist|$)", pr_body, re.DOTALL) +# Adjusted regex to only capture the text between "Proposed changes" and "Checklist" +proposed_changes_match = re.search(r"### Proposed changes\s+([\s\S]*?)\s*### Checklist", pr_body) if proposed_changes_match: proposed_changes_text = proposed_changes_match.group(1).strip() print(f"Extracted 'Proposed changes' text: {proposed_changes_text}") # Debugging line