Skip to content

Commit

Permalink
chore: add validation for PR description and checklist
Browse files Browse the repository at this point in the history
  • Loading branch information
oCHRISo committed Oct 9, 2024
1 parent fe2df78 commit 7e7edc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/validate_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
pr_body = response.json().get("body", "")

# Print the PR body for debugging (optional)
print("PR Body:", pr_body)
#print("PR Body:", pr_body)

# 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
#print(f"Extracted 'Proposed changes' text: {proposed_changes_text}") # Debugging line
word_count = len(proposed_changes_text.split())

if word_count <= 10:
Expand Down

0 comments on commit 7e7edc3

Please sign in to comment.