From 064249e5110444bfb5fb3ffe0f2494596c9bfa9f Mon Sep 17 00:00:00 2001 From: Lluis Campos Date: Fri, 6 Feb 2026 14:45:40 +0100 Subject: [PATCH] ci: Fix CHANGELOG contents in "Update CHANGELOG" PRs The mistake comes from (wrongly) imitating release-please. Create an empty commit, and then delegate the whole logic of prepending the "next" changelog with the existing one to the second part of this CI job script. Ticket: QA-1465 Signed-off-by: Lluis Campos --- .gitlab-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 91891cd..7affc02 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -268,9 +268,7 @@ release:candidate:update-changelog: - RELEASE_CANDIDATE_PR=$(gh pr list --author "mender-test-bot" --head "release-candidate-${CI_COMMIT_REF_NAME}" --json number | jq -r '.[0].number // empty') - if [ -z "$RELEASE_CANDIDATE_PR" ]; then - git checkout -b release-candidate-${CI_COMMIT_REF_NAME} - - echo ":construction:" > CHANGELOG.md - - git add CHANGELOG.md - - 'git commit -s -m "chore: Update CHANGELOG for Mender Client ${CI_COMMIT_REF_NAME}"' + - 'git commit --allow-empty -s -m "chore: Update CHANGELOG for Mender Client ${CI_COMMIT_REF_NAME}"' - git push --force github-${CI_JOB_ID} release-candidate-${CI_COMMIT_REF_NAME} - gh pr create --title "Update CHANGELOG for Mender Client ${CI_COMMIT_REF_NAME}"