diff --git a/.github/workflows/auto-update-changelog.yaml b/.github/workflows/auto-update-changelog.yaml new file mode 100644 index 0000000..4d9fe79 --- /dev/null +++ b/.github/workflows/auto-update-changelog.yaml @@ -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, + 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