Skip to content

CI: add changelog check #6

CI: add changelog check

CI: add changelog check #6

name: Changelog
on:
pull_request:
jobs:
check-changelog:
name: Check for changelog entry
runs-on: ubuntu-latest
env:
PR_SUBMITTER: ${{ github.actor }}
PR_NUMBER: ${{ github.event.number }}
PR_BASE: ${{ github.base_ref }}
steps:
- uses: actions/checkout@v4
- name: Fetch PR base
run: git fetch --no-tags --prune --depth=1 origin
- name: Search for added line in changelog
run: |
ADDED=$(git diff -U0 "origin/${PR_BASE}" HEAD -- CHANGELOG.md | grep -P '^\+[^\+].+$')
grep "#${PR_NUMBER}\\b.*@{PR_SUBMITTER}\\b" <<< "$ADDED"