ci: use BACKPORT_MERGE_COMMIT option (#16730)

Instead of attempting to pick each individual commit in a PR using
`BACKPORT_MERGE_COMMIT` only picks the commit that was merged into
`main`.

This reduces the amount of work done during a backport, generating
cleaner merges and avoiding potential issues on specific commits.

With this setting PRs that are not squashed will fail to backport and
must be handled manually, but those are considered exceptions.
This commit is contained in:
Luiz Aoqui
2023-03-30 11:49:46 -04:00
committed by GitHub
parent d05eed628d
commit 1721e687c0

View File

@@ -19,6 +19,7 @@ jobs:
env:
BACKPORT_LABEL_REGEXP: "backport/(?P<target>website)"
BACKPORT_TARGET_TEMPLATE: "stable-{{.target}}"
BACKPORT_MERGE_COMMIT: true
GITHUB_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
- name: Backport changes to targeted release branch
run: |
@@ -26,6 +27,7 @@ jobs:
env:
BACKPORT_LABEL_REGEXP: "backport/(?P<target>\\d+\\.\\d+\\.[+\\w]+)"
BACKPORT_TARGET_TEMPLATE: "release/{{.target}}"
BACKPORT_MERGE_COMMIT: true
GITHUB_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
handle-failure:
needs: