From d2ebc253153c171b4ae3b1d36ddf910f815f818c Mon Sep 17 00:00:00 2001 From: Sven Klemm Date: Wed, 20 Sep 2023 10:06:13 +0200 Subject: [PATCH] Ignore deleted files in changelog_check Only check files that were added, copied, modified or renamed in changelog check. --- .github/workflows/changelog-check.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/changelog-check.yaml b/.github/workflows/changelog-check.yaml index 892e7595736..65f5183830d 100644 --- a/.github/workflows/changelog-check.yaml +++ b/.github/workflows/changelog-check.yaml @@ -38,7 +38,7 @@ jobs: folder=".unreleased" # Get the list of modified files in this pull request - files=$(git --no-pager diff --name-only HEAD $(git merge-base HEAD ${{ github.event.pull_request.base.sha }})) + files=$(git --no-pager diff --diff-filter=ACMR --name-only $(git merge-base HEAD ${{ github.event.pull_request.base.sha }}) HEAD) if echo "$BODY" | egrep -qsi "Disable-check:[[:space:]]*force-changelog-file"; then # skip changelog checks if forced @@ -46,8 +46,8 @@ jobs: else # if no changelog files found, and the PR does not have the force disable check option if ! echo "${files}" | grep -Eq "^(${folder})/.+$"; then - echo "PR does not add a change log file in .unlreased/ folder" - echo "Check .unlreased/template.rfc822 for the format of the change log file." + echo "PR does not add a change log file in .unreleased/ folder" + echo "Check .unreleased/template.rfc822 for the format of the change log file." echo echo "To disable changelog updated check, add this trailer to pull request message:" echo