Skip to content

Commit be59fd3

Browse files
committed
Fix issue pattern matching in get_release_notes.py
Updated the regex handling to capture issue keys correctly from commit messages. This ensures that both formats `[#ISSUE-123]` and `[ISSUE-123]` are properly identified and added.
1 parent b5bfd05 commit be59fd3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

get_release_notes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def extract_issues(commit: str) -> tuple[str, ...]:
118118
"""Return issues from commit."""
119119
issues = set()
120120
pattern = re.compile(r'[#^]([A-Z]+-\d+)|^\[([A-Z]+-\d+)]')
121-
issues.update(match[0] for match in pattern.findall(commit))
121+
issues.update(match[0] or match[1] for match in pattern.findall(commit))
122122
return tuple(issues)
123123

124124

0 commit comments

Comments
 (0)