File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 16
16
# Turn 1.5.6 into 1.5.x
17
17
targetBranch=" $( echo " $version " | grep -oE ' ^[0-9]+\.[0-9]+' ) .x"
18
18
19
+ # The SHAs of all commits associated with the source ticket
20
+ shas=$( git log --grep=" $sourceGh " --reverse --format=" %H" )
21
+
19
22
# Checkout target branch and cherry-pick commit
20
23
echo " Checking out branch $targetBranch "
21
24
git checkout $targetBranch
22
25
23
- echo " Cherry-pick commit from $branch "
24
- git cherry-pick $branch
26
+ # Cherry-pick all previously found SHAs
27
+ while IFS= read -r sha
28
+ do
29
+ echo " Cherry-pick commit $sha from $branch "
30
+ git cherry-pick $sha
31
+ done <<< $shas
25
32
26
33
echo " gh issue create --title \" $title \" --body \" Back-port of $sourceGh .\" --label \" $labels \" --assignee \" @me\" --milestone \" $version \" "
27
34
number=$( gh issue create --title " $title " --body " Back-port of $sourceGh ." --label " $labels " --assignee " @me" --milestone " $version " | awk -F ' /' ' {print $NF}' )
You can’t perform that action at this time.
0 commit comments