Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions zorg/buildbot/reporters/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,11 @@ def _extract_issue(self, props): # override
log.msg(f"LLVMFailGitHubReporter._extract_issue: INFO: props={props}")
title = props.getProperty("title")
if title:
# Search for PR# in the first line of the commit description, which looks like 'Some text (#123)'.
m = re.search(r"^.* \(#(\d+)\)$", title)
# Search for PR# in the first line of the commit description,
# which looks like 'Some text (#123)' or 'Some text #123'.
m = re.search(r"^.* (\(#(\d+)\)|#(\d+))$", title)
if m:
return m.group(1)
return m.group(2) or m.group(3)
return None

# This function is for logging purposes only.
Expand Down