File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -34,18 +34,18 @@ jobs:
34
34
git config --global user.email '[email protected] '
35
35
cherryPickToken='${{ inputs.autoCherryPickToken }}'
36
36
commitMessage='${{ github.event.head_commit.message }}'
37
- branches=$(echo '$commitMessage' | grep '$cherryPickToken' | grep -o1 -E "([0-9]+\.[0-9]+\.x)")
38
- branchCommitMessage=$(echo '$commitMessage' | grep -v '$cherryPickToken')
37
+ branches=$(echo "$commitMessage" | grep "$cherryPickToken" | grep -o1 -E "([0-9]+\.[0-9]+\.x)")
39
38
for branch in $branches
40
39
do
41
- git checkout $branch
42
- if git cherry-pick ${{ github.sha }}
40
+ git checkout " $branch"
41
+ if git cherry-pick ${{ github.sha }} -x
43
42
then
44
- echo "::notice title=Commit cherry-picked::` ${{ github.sha }}` to branch ` $branch` "
43
+ echo "::notice title=Commit cherry-picked::${{ github.sha }} to branch $branch"
45
44
else
46
- echo "::error title=Cannot cherry-pick::` ${{ github.sha }}` to branch ` $branch` . Manual procedure required"
45
+ echo "::error title=Cannot cherry-pick::${{ github.sha }} to branch $branch. Manual procedure required"
47
46
exit 1
48
47
fi
49
- git commit –amend -m "$branchCommitMessage"
48
+ branchCommitMessage=$(git log -1 --pretty=%B | grep -v "$cherryPickToken")
49
+ git commit --amend -o -m "$branchCommitMessage"
50
50
git push $branch
51
51
done
You can’t perform that action at this time.
0 commit comments