Last active
January 26, 2026 16:15
-
-
Save jacksonj04/f3f69116e3d985501a26b33ce0875897 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Enforce update to changelog | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled] | |
| branches: | |
| - main | |
| jobs: | |
| changelog: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Skip if PR has no-changelog label | |
| if: "contains( github.event.pull_request.labels.*.name, 'no-changelog')" | |
| run: | | |
| echo "✅ Skipping changelog check due to no-changelog label" | |
| - name: Check changelog has been updated | |
| if: "!contains(github.event.pull_request.labels.*.name, 'no-changelog')" | |
| run: | | |
| git fetch origin main | |
| # Check for a non-whitespace change to CHANGELOG.md | |
| if git diff --ignore-all-space --name-only origin/main...HEAD | grep -q "^src/changelog.md$"; then | |
| echo "✅ Changelog has been updated" | |
| else | |
| echo "❌ src/changelog.md must be updated in this PR" | |
| echo " (or add the 'no-changelog' label to bypass)" | |
| exit 1 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment