Skip to content

Commit fa1e124

Browse files
authored
Merge pull request #9 from devrev/markdown-formatting/regex
chore: made regex more flexible to handle markdown
2 parents eaf443b + 2d4eb61 commit fa1e124

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

checks/check_pr_description.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ def check_description(description):
66
Checks if the PR description contains a work item link.
77
Returns True if valid, False otherwise.
88
"""
9-
regex = r"(^|\s|\[)(https:\/\/app\.devrev\.ai\/devrev\/works\/)?(ISS|TKT|TASK)-\d+\b"
9+
# More flexible regex that handles markdown formatting
10+
regex = r"(?:^|[\s\[\(\-\*\>\.]|:\s)(https:\/\/app\.devrev\.ai\/devrev\/works\/)?(ISS|TKT|TASK)-\d+\b"
1011
return bool(re.search(regex, description, re.IGNORECASE))
1112

1213
def check_description_cli(description):

0 commit comments

Comments
 (0)