claude #46
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: claude | |
| on: | |
| issue_comment: | |
| types: [created] | |
| pull_request_review_comment: | |
| types: [created] | |
| issues: | |
| types: [opened, assigned] | |
| pull_request_review: | |
| types: [submitted] | |
| workflow_dispatch: | |
| inputs: | |
| prompt: | |
| description: 'Message to send to Claude' | |
| required: true | |
| default: 'Please validate your MCP server setup and available subagents.' | |
| type: string | |
| jobs: | |
| initialize: | |
| uses: ./.github/workflows/core--initializer.yaml | |
| claude: | |
| if: | | |
| (github.event_name == 'issue_comment' && contains(github.event.comment.body, '/claude')) || | |
| (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '/claude')) || | |
| (github.event_name == 'pull_request_review' && contains(github.event.review.body, '/claude')) || | |
| (github.event_name == 'issues' && (contains(github.event.issue.body, '/claude') || contains(github.event.issue.title, '/claude'))) || | |
| (github.event_name == 'workflow_dispatch') | |
| needs: [initialize] | |
| permissions: | |
| contents: read | |
| id-token: write | |
| issues: read | |
| pull-requests: read | |
| uses: emcd/python-project-common/.github/workflows/xrepo--claude.yaml@gha-1 | |
| with: | |
| allowed-tools: 'Bash(git add:*),Bash(git branch:*),Bash(git checkout:*),Bash(git diff:*),Bash(git log:*),Bash(git ls-files:*),Bash(git remote:*),Bash(git reset:*),Bash(git rev-parse:*),Bash(git rm:*),Bash(git status),Bash(hatch:*),Bash(pip:*),Bash(python:*),Edit,Write,mcp__context7__resolve-library-id,mcp__context7__get-library-docs,mcp__librovore__query_inventory,mcp__librovore__query_content' | |
| python-version: '${{ fromJSON(needs.initialize.outputs.python-versions)[0] }}' | |
| timeout-minutes: 20 | |
| prompt: '${{ inputs.prompt }}' | |
| secrets: | |
| anthropic-api-key: '${{ secrets.ANTHROPIC_API_KEY }}' |