Apache Lucene open-source search software
Use diff exit code correctly in changelolg verifier (#14628)
Stefan Voditaf27566da487f
diff --git a/.github/workflows/verify-changelog-and-set-milestone.yml b/.github/workflows/verify-changelog-and-set-milestone.ymlindex 5c671cf8ed3..a893e02e582 100644--- a/.github/workflows/verify-changelog-and-set-milestone.yml+++ b/.github/workflows/verify-changelog-and-set-milestone.yml@@ -45,8 +45,7 @@ jobs:# Add and fetch full history of the base branchBASE_BRANCH=${{ github.event.pull_request.base.ref }}# We need this to ensure we will be able to find the merge base- git fetch --unshallow || true- git fetch upstream $BASE_BRANCH+ git fetch upstream $BASE_BRANCH --unshallow# Find merge base commit to diff againstBASE_COMMIT=$(git merge-base HEAD upstream/$BASE_BRANCH)@@ -57,8 +56,7 @@ jobs:git log --oneline -n 3 HEADecho "Diff:"- git diff --name-only $BASE_COMMIT HEAD -- ${{ env.CHANGE_LOG_FILE }}- if ! git diff --name-only $BASE_COMMIT HEAD -- ${{ env.CHANGE_LOG_FILE }}; then+ if git diff --exit-code --name-only $BASE_COMMIT HEAD -- ${{ env.CHANGE_LOG_FILE }}; thenecho "Change log file:${{ env.CHANGE_LOG_FILE }} does not contains an entry corresponding to changes introduced in PR. Please add a changelog entry."exit 0else