File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -616,22 +616,20 @@ def create_pull_request(
616616 def execute_command (self ) -> bool :
617617 """
618618 This function reads lines from STDIN and executes the first command
619- that it finds. The 2 supported commands are:
620- /cherry-pick commit0 <commit1> <commit2> <...>
621- /branch <owner>/<repo>/<branch>
619+ that it finds. The supported command is:
620+ /cherry-pick< ><:> commit0 <commit1> <commit2> <...>
622621 """
623622 for line in sys .stdin :
624623 line .rstrip ()
625- m = re .search (r"/([a-z-]+)\s(.+ )" , line )
624+ m = re .search (r"/cherry-pick\s*:? *(.* )" , line )
626625 if not m :
627626 continue
628- command = m .group (1 )
629- args = m .group (2 )
630627
631- if command == "cherry-pick" :
632- arg_list = args .split ()
633- commits = list (map (lambda a : extract_commit_hash (a ), arg_list ))
634- return self .create_branch (commits )
628+ args = m .group (1 )
629+
630+ arg_list = args .split ()
631+ commits = list (map (lambda a : extract_commit_hash (a ), arg_list ))
632+ return self .create_branch (commits )
635633
636634 print ("Do not understand input:" )
637635 print (sys .stdin .readlines ())
You can’t perform that action at this time.
0 commit comments