@@ -36,17 +36,29 @@ def backport_task(commit_hash, branch, *, issue_number, created_by, merged_by):
36
36
print (f"pwd: { os .pwd ()} , listdir: { os .listdir ('.' )} " )
37
37
util .comment_on_pr (issue_number ,
38
38
f"""{ util .get_participants (created_by , merged_by )} , Something is wrong... I can't backport for now.
39
- Please backport using [cherry_picker](https://pypi.org/project/cherry-picker/) on command line.""" )
39
+ Please backport using [cherry_picker](https://pypi.org/project/cherry-picker/) on command line.
40
+ ```
41
+ cherry_picker { commit_hash } { branch }
42
+ ```
43
+ """ )
40
44
cp = cherry_picker .CherryPicker ('origin' , commit_hash , [branch ])
41
45
try :
42
46
cp .backport ()
43
47
except cherry_picker .BranchCheckoutException :
44
48
util .comment_on_pr (issue_number ,
45
49
f"""Sorry { util .get_participants (created_by , merged_by )} , I had trouble checking out the `{ branch } ` backport branch.
46
- Please backport using [cherry_picker](https://pypi.org/project/cherry-picker/) on command line.""" )
50
+ Please backport using [cherry_picker](https://pypi.org/project/cherry-picker/) on command line.
51
+ ```
52
+ cherry_picker { commit_hash } { branch }
53
+ ```
54
+ """ )
47
55
cp .abort_cherry_pick ()
48
56
except cherry_picker .CherryPickException :
49
57
util .comment_on_pr (issue_number ,
50
58
f"""Sorry, { util .get_participants (created_by , merged_by )} , I could not cleanly backport this to `{ branch } ` due to a conflict.
51
- Please backport using [cherry_picker](https://pypi.org/project/cherry-picker/) on command line.""" )
59
+ Please backport using [cherry_picker](https://pypi.org/project/cherry-picker/) on command line.
60
+ ```
61
+ cherry_picker { commit_hash } { branch }
62
+ ```
63
+ """ )
52
64
cp .abort_cherry_pick ()
0 commit comments