Fix the regex for setting topic
The regex did not support the use of a `:` and a `#` in the bug identification line. The updated regex now will support bug identification lines that look like `Closes-Bug: #12345`. Co-Authored-By: Nicolas Simonds <nic@metacloud.com> Change-Id: Ie5edd9a04fe714302f06b2df2c4c134a2ef2316a
This commit is contained in:
parent
242d80b125
commit
887e37943d
@ -589,7 +589,7 @@ def get_topic(target_branch):
|
||||
"/".join(branch_parts[2:]))
|
||||
|
||||
log_output = run_command("git log HEAD^1..HEAD")
|
||||
bug_re = r'\b([Bb]ug|[Ll][Pp])\s*[#:]?\s*(\d+)'
|
||||
bug_re = r'\b([Bb]ug|[Ll][Pp])\s*[:]?\s*[#]?\s*(\d+)'
|
||||
|
||||
match = re.search(bug_re, log_output)
|
||||
if match is not None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user