mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
git cl split: recognize bug patterns of the form "Bug: chromium:123"
Currently, only the "Bug: 123" form is recognized. Bug: none Change-Id: I4348779bb14f4c02bb8781ce4fe2bd55892e8cfa Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4289407 Commit-Queue: Thiago Perrotta <tperrotta@chromium.org> Reviewed-by: Dirk Pranke <dpranke@google.com>
This commit is contained in:
@@ -248,8 +248,10 @@ def SplitCl(description_file, comment_file, changelist, cmd_upload, dry_run,
|
||||
if answer.lower() != 'y':
|
||||
return 0
|
||||
|
||||
# Verify that the description contains a bug link.
|
||||
bug_pattern = re.compile(r"^Bug:\s*[0-9]+", re.MULTILINE)
|
||||
# Verify that the description contains a bug link. Examples:
|
||||
# Bug: 123
|
||||
# Bug: chromium:456
|
||||
bug_pattern = re.compile(r"^Bug:\s*(?:[a-zA-Z]+:)?[0-9]+", re.MULTILINE)
|
||||
matches = re.findall(bug_pattern, description)
|
||||
answer = 'y'
|
||||
if not matches:
|
||||
|
||||
Reference in New Issue
Block a user