Skip to content
50 changes: 50 additions & 0 deletions .github/workflows/auto-update-changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Auto-update changelog

on:
workflow_call:
secrets:
ANTHROPIC_API_KEY:
required: true
TAYLORBOT_GITHUB_ACTION:
required: true

permissions: {}

jobs:
report:
runs-on: ubuntu-latest
permissions:
contents: write # To push commits
pull-requests: write # To comment in PR
steps:
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: '20'

- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0 # We need the full history to compare changes
persist-credentials: false

- name: Update changelog
uses: anthropics/claude-code-action@70e16deb18402428bd09e08d1ec3662a872e3c72 # v1.0.41
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.TAYLORBOT_GITHUB_ACTION }}
prompt: |
If a CHANGELOG.md file exists in the repository root, check if the current pull
request updates it.

If CHANGELOG.md exists but is not updated in this PR, update it with information
about the changes in this branch compared to the default branch.

Normally, dependency updates fall under the `### Changed` category. In some cases,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add a hint for Added or Removed blocks?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to try first with a simple prompt. After all the keepachangelog format is well-documented.

if they are security-related, they might fall under the `### Fixed` category. Check
the pull request title and description for hints.

Comment into the PR to inform the author about your updating of the changelog.
claude_args: >
--max-turns 10
--model claude-haiku-4-5-20251101
--allowedTools Bash