1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

[CI] backport strategy must fail when it conflicts

strategy: ort

The strategy is changed from "recursive" to "ort", which is the
default for git >= 2.43.2 and claims to reduce the likelyhood of
conflicts according to man git-merge:

> This has been reported to result in fewer merge conflicts without
> causing mismerges...

strategy-option: find-renames

The default option are the same for both strategies and "theirs" will:

> This option forces conflicting hunks to be auto-resolved
> cleanly by favoring their version.

"their" being whatever is not in the commits being cherry-picked.

In the context of Forgejo backports, this is not what is desired:
whenever a conflict happens it needs to be manually resolved and
prefering whatever is in the stable branch will not lead to a sane
backport.

It is changed back to "find-renames" which is documented to be the
default:

> Turn on rename detection, optionally setting the similarity
> threshold. This is the default.

Fixes: https://codeberg.org/forgejo/forgejo/issues/2886
This commit is contained in:
Earl Warren 2024-03-30 09:44:19 +01:00
parent 91b745a5b6
commit ffdba30a62
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -77,9 +77,11 @@ jobs:
echo "target-branch: ${{ fromJSON(steps.extract-targets.outputs.targets)[0] }}"
echo "pull-request: ${{ github.event.pull_request.url }}"
- uses: https://code.forgejo.org/actions/git-backporting@v4.5.2
- uses: https://code.forgejo.org/actions/git-backporting@v4.6.0
with:
target-branch: ${{ fromJSON(steps.extract-targets.outputs.targets)[0] }}/forgejo
strategy: ort
strategy-option: find-renames
no-squash: true
auth: ${{ secrets.BACKPORT_TOKEN }}
pull-request: ${{ github.event.pull_request.url }}