File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 2424 git config --global user.name "github-actions[bot]"
2525 git config --global user.email "github-actions[bot]@users.noreply.github.com"
2626 - name : Get PRs with Milestone
27+ env :
28+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2729 id : fetch_prs
2830 run : |
2931 PR_LIST=$(gh pr list --state closed --json number,milestone,mergeCommitSha \
@@ -36,13 +38,17 @@ jobs:
3638 echo "$PR_LIST"
3739 echo "::set-output name=pr_list::$PR_LIST"
3840 - name : Create new branch
41+ env :
42+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3943 id : create_branch
4044 run : |
4145 NEW_BRANCH="cherry-pick-${{ inputs.milestone }}-$(date +'%Y%m%d%H%M%S')"
4246 git checkout ${{ inputs.target_branch }}
4347 git checkout -b $NEW_BRANCH
4448 echo "::set-output name=new_branch::$NEW_BRANCH"
4549 - name : Cherry-pick PRs
50+ env :
51+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4652 run : |
4753 for COMMIT in ${{ steps.fetch_prs.outputs.pr_list }}; do
4854 echo "Cherry-picking commit $COMMIT..." git cherry-pick $COMMIT || {
5561 git push origin ${{ steps.create_branch.outputs.new_branch }}
5662 - name : Create Pull Request
5763 uses : peter-evans/create-pull-request@v5
64+ env :
65+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5866 with :
5967 token : ${{ secrets.GITHUB_TOKEN }}
6068 base : ${{ inputs.target_branch }}
You can’t perform that action at this time.
0 commit comments