Skip to content

Commit

Permalink
Ignore deleted files in changelog_check
Browse files Browse the repository at this point in the history
Only check files that were added, copied, modified or renamed in
changelog check.
  • Loading branch information
svenklemm committed Sep 20, 2023
1 parent 270ea4f commit d2ebc25
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/changelog-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ 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
exit 0
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
Expand Down

0 comments on commit d2ebc25

Please sign in to comment.