diff --git a/.github/workflows/auto-pr-precise.yml b/.github/workflows/auto-pr-precise.yml index 3de611b9..26f6bd55 100644 --- a/.github/workflows/auto-pr-precise.yml +++ b/.github/workflows/auto-pr-precise.yml @@ -64,18 +64,16 @@ jobs: echo "__EOF" >> $GITHUB_OUTPUT REVS=$(git rev-list --reverse ${{ github.event.commits[0].id }}~..${{ github.event.after }} ) for rev in "$REVS"; do - if ! git cherry-pick -X theirs ${rev} ; then - echo "merge=false" >> $GITHUB_OUTPUT - exit 0; + if ! git cherry-pick ${rev} ; then + git add -u + git -c core.editor=true cherry-pick --continue fi done git push -d origin ${{steps.create_branch.outputs.PRBRANCH}} || true git push -u origin ${{steps.create_branch.outputs.PRBRANCH}} - echo "merge=true" >> $GITHUB_OUTPUT - uses: actions/github-script@v7 name: Open pick PR to ${{steps.branch_info.outputs.NEXT_BRANCH}} - if: steps.merge-changes.outputs.merge == 'true' with: github-token: ${{ secrets.AUTOPR_SECRET }} script: | @@ -87,16 +85,3 @@ jobs: body: `${{steps.merge-changes.outputs.MESSAGE}}\nGenerated by Auto PR, by cherry-pick related commits`, }); - - uses: actions/github-script@v7 - name: Open merge PR to ${{steps.branch_info.outputs.NEXT_BRANCH}} - if: steps.merge-changes.outputs.merge == 'false' - with: - github-token: ${{ secrets.AUTOPR_SECRET }} - script: | - await github.rest.pulls.create({ - ...context.repo, - title: `[Merge][${{steps.branch_info.outputs.CURRENT_VERSION}} to ${{steps.branch_info.outputs.NEXT_VERSION}}] ${{steps.merge-changes.outputs.TITLE}}`, - head: `${context.ref}`, - base: `${{steps.branch_info.outputs.NEXT_BRANCH}}`, - body: `${{steps.merge-changes.outputs.MESSAGE}}\nGenerated by Auto PR, using merge since cherry-pick failed`, - });