Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoPR always using cherry-pick but do not resolve conflicts #707

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 3 additions & 18 deletions .github/workflows/auto-pr-precise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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`,
});
Loading