Skip to content

Implement forwarding filter #1756

Implement forwarding filter

Implement forwarding filter #1756

name: Enforce CHANGELOG Update
on:
pull_request:
branches:
- master
workflow_call:
jobs:
check-changelog-update:
if: ${{ !contains( github.event.pull_request.labels.*.name, 'no-changelog') }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- id: files
uses: jitterbit/get-changed-files@v1
- name: Verify changes in CHANGELOG file
id: verify-changes
run: |
changelogPresent=0
for changed_file in ${{ steps.files.outputs.all }}; do
if [ "$changed_file" == "CHANGELOG.md" ]; then
changelogPresent=1
break
fi
done
echo "::set-output name=changelog-updated::$changelogPresent"
- name: Check
if: ${{ steps.verify-changes.outputs.changelog-updated == 0 }}
uses: actions/github-script@v3
with:
script: |
core.setFailed('Add label "no-changelog" or update CHANGELOG.md on pull request to master.')