You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# We want to check modified files from base_ref (merge target) to the current commit,
# so we need the full history of the current branch.
fetch-depth: 0
- name: Check for skip label
id: check-skip
run: |
if [[ "${{ contains(github.event.pull_request.labels.*.name, 'skip-changelog') }}" == "true" ]]; then
echo "skip=true" >> $GITHUB_OUTPUT
echo "Skipping changelog validation due to skip-changelog label"
else
echo "skip=false" >> $GITHUB_OUTPUT
fi
- name: Validate changelog entry
if: steps.check-skip.outputs.skip == 'false'
run: |
# --quiet implies --exit-code (but doesn't produce output).
# --exit-code exits 1 if there are differences, or 0 if there are no differences.
# So: this command exits 1 if CHANGELOG.md was changed between the base and HEAD,
# or 0 if there are no diffs.
if git diff --quiet origin/"${{ github.base_ref }}"...HEAD -- CHANGELOG.md; then
echo "::error::No changelog entry found. Please add an entry to CHANGELOG.md or add the 'skip-changelog' label if this change does not require a changelog entry."