Skip to content
Merged
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
32 changes: 32 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on:
pull_request:
types: [ opened ]

permissions:
contents: write

jobs:
update-changelog:
if: github.event.pull_request.user.login == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Update CHANGELOG
run: |
PR_TITLE="${{ github.event.pull_request.title }}"
PR_NUMBER="${{ github.event.pull_request.number }}"

# Format: - deps(scope): description (#PR_NUMBER)
CHANGELOG_ENTRY="- $PR_TITLE (#$PR_NUMBER)"

# Insert entry below [Unreleased]
sed -i '/\[Unreleased\]/a\'"$CHANGELOG_ENTRY" CHANGELOG.md

- name: Commit changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add CHANGELOG.md
git commit -m "docs: update CHANGELOG for PR #${{ github.event.pull_request.number }}" || echo "No changes to commit"
git push
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Loading