Skip to content

Commit

Permalink
Automations - Check pull requests for changelog modification (#785)
Browse files Browse the repository at this point in the history
* Creat workflow to check for changelog updates on pr

* checkout v3
  • Loading branch information
luke11brown authored Aug 1, 2024
1 parent 64c7dac commit a1f8daf
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/Changelog Police.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check Changelog has been updated

on:
pull_request:
types: [opened, edited, synchronize]

jobs:
changelog-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Check if changelog has been updated
run: |
if ! git diff --name-only origin/main...HEAD | grep -q '\.github\CHANGELOG.md'; then
echo "Changelog not updated. Please update .github/CHANGELOG.md" >&2
exit 1
fi
- name: Notify success
if: success()
run: echo "Changelog has been updated."

0 comments on commit a1f8daf

Please sign in to comment.