diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py index e2b84aeca3ad7..7eb76e435b3f3 100755 --- a/llvm/utils/git/github-automation.py +++ b/llvm/utils/git/github-automation.py @@ -603,16 +603,16 @@ def execute_command(self) -> bool: """ This function reads lines from STDIN and executes the first command that it finds. The 2 supported commands are: - /cherry-pick commit0 <...> - /branch // + /cherry-pick<:> commit0 <...> + /branch<:> // """ for line in sys.stdin: line.rstrip() - m = re.search(r"/([a-z-]+)\s(.+)", line) + m = re.search(r"/([a-z-]+)(:?)(?:\s(.+))?", line) if not m: continue command = m.group(1) - args = m.group(2) + args = m.group(3) if command == "cherry-pick": arg_list = args.split()