File tree 1 file changed +8
-10
lines changed 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(
616
616
def execute_command (self ) -> bool :
617
617
"""
618
618
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> <...>
622
621
"""
623
622
for line in sys .stdin :
624
623
line .rstrip ()
625
- m = re .search (r"/([a-z-]+)\s(.+ )" , line )
624
+ m = re .search (r"/cherry-pick\s*:? *(.* )" , line )
626
625
if not m :
627
626
continue
628
- command = m .group (1 )
629
- args = m .group (2 )
630
627
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 )
635
633
636
634
print ("Do not understand input:" )
637
635
print (sys .stdin .readlines ())
You can’t perform that action at this time.
0 commit comments