From 5f48d2fc54b3c2b372f681d8639976f2327c86f5 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Fri, 30 Oct 2026 15:46:47 +0100 Subject: [PATCH] ci: simplify the PR description of a conflicting merge --- .github/workflows/merge-forward.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/merge-forward.yaml b/.github/workflows/merge-forward.yaml index 77a197ca29..f96ce1061b 100644 --- a/.github/workflows/merge-forward.yaml +++ b/.github/workflows/merge-forward.yaml @@ -35,10 +35,6 @@ jobs: - name: Merge main into the release branches and next, the release branches into next env: GH_TOKEN: ${{ github.token }} - BODY: | - The branches do not merge without conflicts. Resolve them on this branch, with the Resolve conflicts button of this pull request or with a merge of the base branch on a checkout of it. Both leave the source branch as it is. - - Then merge this pull request with a merge commit. A squash merge leaves the source branch unmerged, so the next merge conflicts again. run: | gh auth setup-git git config user.name "github-actions[bot]" @@ -78,9 +74,15 @@ jobs: pull_request="$(gh pr list --head "$head" --base "$2" --json url --jq '.[0].url')" if [ -n "$pull_request" ]; then gh pr edit "$pull_request" --title "$title" - else - gh pr create --base "$2" --head "$head" --title "$title" --body "$BODY" + return fi + cat > "$RUNNER_TEMP/body.md" < [!IMPORTANT] + > Merge this PR with a merge commit, not a squash merge, so the next merge forward does not conflict again. + BODY + gh pr create --base "$2" --head "$head" --title "$title" --body-file "$RUNNER_TEMP/body.md" } releases="$(git branch --remotes --list 'origin/release/*' --format='%(refname:lstrip=3)' | grep -vE '\.0$' | sort -V || true)" for release in $releases; do