Skip to content

Automated dependency upgrades #201

Automated dependency upgrades

Automated dependency upgrades #201

name: Changelog Checker
on:
pull_request:
types: [opened, synchronize, labeled, unlabeled]
branches:
- main
jobs:
changelog-check:
if: "!contains(github.event.pull_request.labels.*.name, 'pr/no-changelog')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0 # by default the checkout action doesn't check out all branches
- name: Check for changelog entry in diff
run: |
# Check if there's a diff on CHANGELOG.md
changelog_diff=$(git --no-pager diff --name-only HEAD "$(git merge-base HEAD "origin/${{ github.event.pull_request.base.ref }}")" -- CHANGELOG.md)
if [ -z "$changelog_diff" ]; then
echo "Did not detect changes in CHANGELOG.md"
echo "If no changelog entry is needed, skip this check with the 'pr/no-changelog' label"
exit 1
else
echo "Found changelog entry in PR!"
fi