From 1721e687c0832bea3d9b7eec5dcd3c4e7a924d71 Mon Sep 17 00:00:00 2001 From: Luiz Aoqui Date: Thu, 30 Mar 2023 11:49:46 -0400 Subject: [PATCH] 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. --- .github/workflows/backport.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index a6e0121ca..1966d2cc6 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -19,6 +19,7 @@ jobs: env: BACKPORT_LABEL_REGEXP: "backport/(?Pwebsite)" 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\\d+\\.\\d+\\.[+\\w]+)" BACKPORT_TARGET_TEMPLATE: "release/{{.target}}" + BACKPORT_MERGE_COMMIT: true GITHUB_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }} handle-failure: needs: