Skip to content

Set up weekly frontmatter metrics workflow #13

Set up weekly frontmatter metrics workflow

Set up weekly frontmatter metrics workflow #13

Workflow file for this run

name: Changelog Automation
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_call:
permissions:
contents: read
pull-requests: read
jobs:
validate-changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Check for changelog entry
run: |
# Skip changelog validation for release and documentation PRs
if [[ "${{ github.head_ref }}" =~ ^(release/|chore/release|docs/) ]]; then
echo "Skipping changelog validation for release/docs PR"
exit 0
fi
# Check if CHANGELOG.md has been modified
if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "CHANGELOG.md"; then
echo "✅ Changelog has been updated"
else
echo "❌ Please add a changelog entry to CHANGELOG.md"
echo ""
echo "Add your changes under the [Unreleased] section using this format:"
echo ""
echo "### Added"
echo "- Description of new features"
echo ""
echo "### Changed"
echo "- Description of changes"
echo ""
echo "### Fixed"
echo "- Description of bug fixes"
echo ""
exit 1
fi
- name: Validate changelog format
run: |
# Basic validation of changelog format
if ! grep -q "## \[Unreleased\]" CHANGELOG.md; then
echo "❌ Changelog missing [Unreleased] section"
exit 1
fi
if ! grep -q "### Added\|### Changed\|### Fixed\|### Deprecated\|### Removed\|### Security" CHANGELOG.md; then
echo "⚠️ Consider using standard changelog sections (Added, Changed, Fixed, etc.)"
fi
echo "✅ Changelog format looks good"
- name: Validate changelog links (PR/Issue/Commit)
run: |
chmod +x scripts/maintenance/validate-changelog-links.sh
scripts/maintenance/validate-changelog-links.sh