File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -29,16 +29,27 @@ jobs:
29
29
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30
30
with :
31
31
ref : ${{ github.event.inputs.target_branch }}
32
+ # Check out the entire repository so that the target commit is checked
33
+ # out (by default, only fetches the single commit identified by the
34
+ # `ref` argument).
35
+ fetch-depth : 0
32
36
persist-credentials : false
33
37
- name : Cherry-pick commit
34
38
run : |
35
39
set -eo pipefail
40
+
41
+ AUTHOR_NAME="$(git log -1 --pretty='%an' ${{ github.event.inputs.commit }})"
42
+ AUTHOR_EMAIL="$(git log -1 --pretty='%ae' ${{ github.event.inputs.commit }})"
43
+
44
+ git config --global user.name "$AUTHOR_NAME"
45
+ git config --global user.email "$AUTHOR_EMAIL"
46
+
36
47
git cherry-pick ${{ github.event.inputs.commit }}
37
-
48
+
38
49
PR_TITLE="$(git log -1 --pretty=%s)"
39
50
echo "PR_TITLE=$PR_TITLE" >> $GITHUB_ENV
40
51
41
- AUTHOR="$(git log -1 --pretty='%an <% ae>') "
52
+ AUTHOR="$AUTHOR_NAME <$AUTHOR_EMAIL> "
42
53
echo "AUTHOR=$AUTHOR" >> $GITHUB_ENV
43
54
44
55
- name : Submit PR
You can’t perform that action at this time.
0 commit comments