chore(licenses):SP-4211 Add err_message and error_code fields to Comp… #60
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Changelog Check with Claude | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| id-token: write | |
| jobs: | |
| changelog-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Get full history to compare changes | |
| - name: Check if changelog.md was modified | |
| id: changelog-check | |
| run: | | |
| # Get list of changed files in the PR | |
| git diff --name-only origin/main...HEAD > changed_files.txt | |
| if grep -q "changelog.md\|CHANGELOG.md\|Changelog.md" changed_files.txt; then | |
| echo "changelog_updated=true" >> $GITHUB_OUTPUT | |
| echo "Changelog was updated ✅" | |
| else | |
| echo "changelog_updated=false" >> $GITHUB_OUTPUT | |
| echo "Changelog was NOT updated ❌" | |
| fi | |
| - name: Claude Code Changelog Review | |
| if: steps.changelog-check.outputs.changelog_updated == 'false' | |
| uses: anthropics/claude-code-action@v1 | |
| with: | |
| prompt: | | |
| You are a helpful assistant that analyzes pull request changes and suggests changelog entries. | |
| **Task**: Analyze the current PR changes and suggest appropriate changelog entries for the "Unreleased" section. | |
| **Instructions**: | |
| 1. Use `gh pr diff` to examine the PR changes | |
| 2. Use `gh pr comment` to create a comment in the PR | |
| 3. First, examine the PR diff to understand what changes were made | |
| 4. Review the existing CHANGELOG.md file to understand the current format and structure | |
| 5. Categorize changes according to Keep a Changelog format: | |
| - **Added** for new features | |
| - **Changed** for changes in existing functionality | |
| - **Deprecated** for soon-to-be removed features | |
| - **Removed** for now removed features | |
| - **Fixed** for any bug fixes | |
| - **Security** for vulnerability fixes | |
| 6. Write clear, descriptive changelog entries that explain what was added/changed from a user perspective | |
| 7. Follow the existing changelog style and level of detail | |
| 8. Create a PR comment with a code block containing the suggested changelog entries for the "Unreleased" section. | |
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| claude_args: | | |
| --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*)" |