Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/change-log.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# yaml
name: Check changelog entry

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

Comment thread
BSd3v marked this conversation as resolved.
Comment thread
BSd3v marked this conversation as resolved.
permissions:
contents: read
jobs:
check-changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Determine changed files and require changelog update
env:
EVENT_NAME: ${{ github.event_name }}
PR_BASE_REF: ${{ github.event.pull_request.base.ref || '' }}
BEFORE: ${{ github.event.before }}
SHA: ${{ github.sha }}
run: |
set -euo pipefail

echo "Event: $EVENT_NAME"

if [ "$EVENT_NAME" = "pull_request" ]; then
if [ -z "$PR_BASE_REF" ]; then
echo "Pull request base ref not provided."
exit 1
fi
echo "Fetching base ref origin/$PR_BASE_REF"
if ! git fetch origin "$PR_BASE_REF":refs/remotes/origin/"$PR_BASE_REF"; then
echo "::error::Failed to fetch pull request base ref origin/$PR_BASE_REF."
exit 1
fi
changed=$(git diff --name-only "origin/$PR_BASE_REF...HEAD")
else
if [ "$BEFORE" = "0000000000000000000000000000000000000000" ]; then
# new branch or forced push: list files in the commit
changed=$(git show --name-only --pretty="" "$SHA")
else
changed=$(git diff --name-only "$BEFORE...$SHA")
fi
fi

echo "Changed files:"
echo "$changed" | sed 's/^/ - /'

# match: CHANGELOG.md, NEWS.md, any file under changelog(s)/ or docs/changelog/
echo "$changed" | grep -E '(^CHANGELOG\.md$|^NEWS\.md$|(^|/)changelog(/|$)|(^|/)changelogs(/|$)|(^|/)docs/changelog(/|$))' >/dev/null 2>&1 || {
echo "::error::No changelog changes detected."
echo "Please add or update a changelog entry (e.g. update `CHANGELOG.md` or add a file under `changelog/`)."
exit 1
}

echo "Changelog change detected. OK."
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
Links "DE#nnn" prior to version 2.0 point to the Dash Enterprise closed-source Dash AG Grid repo

## [unreleased]
### Added
- [#453](https://github.com/plotly/dash-ag-grid/pull/453) Test for changelog entry


## [35.2.0] - 2026-04-03
Expand Down
Loading