From bf4ce5a91c7b67eaaeae20caf334204eb4a09984 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 5 Oct 2023 11:59:39 -0400 Subject: [PATCH] .github: use squashed commit for backports The current setting for applying backports from the main branch to a release branch attempts to pick commits one by one and merge them with a merge commit to the release branch. This seldom causes an issue where the backport assistant picks-up every commit from the beginning of the release branch, and applies them through one big merge commit, on top of everything else that was already merged into the release branch. To limit the times it happens, we change how the backport assistant behaves to only apply one squashed commit that contains the changes from the MR into the release branch. --- .github/workflows/backport.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 8e4ebf5e0..0359683d1 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -24,6 +24,7 @@ jobs: env: BACKPORT_LABEL_REGEXP: "backport/(?Pwebsite)" BACKPORT_TARGET_TEMPLATE: "stable-{{.target}}" + BACKPORT_MERGE_COMMIT: false GITHUB_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }} - name: Backport changes to latest release branch run: | @@ -42,6 +43,7 @@ jobs: backport-assistant backport -automerge env: BACKPORT_LABEL_REGEXP: "backport/(?Pwebsite)" + BACKPORT_MERGE_COMMIT: false GITHUB_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }} - name: Backport changes to targeted release branch run: | @@ -50,3 +52,4 @@ jobs: BACKPORT_LABEL_REGEXP: "backport/(?P\\d+\\.\\d+\\.\\w+)" BACKPORT_TARGET_TEMPLATE: "release/{{.target}}" GITHUB_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }} + BACKPORT_MERGE_COMMIT: false