Repository navigation
feat: add scope-based tool discovery #1578
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: Claude Code | |
| on: | |
| issue_comment: | |
| types: [created] | |
| pull_request_review_comment: | |
| types: [created] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.issue.number || github.event.pull_request.number }} | |
| cancel-in-progress: false | |
| jobs: | |
| claude: | |
| runs-on: ubuntu-latest | |
| if: contains(github.event.comment.body, '@claude') | |
| permissions: | |
| id-token: write | |
| pull-requests: write | |
| contents: write | |
| issues: write | |
| actions: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - uses: anthropics/claude-code-action@v1 | |
| id: claude | |
| with: | |
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| # Responds to @claude mentions in comments | |
| claude_args: | | |
| --append-system-prompt "Write to .claude/MEMORIES.md when a user asks you to remember something for the future." | |
| --max-turns 20 | |
| --model sonnet | |
| - name: Output Claude execution log | |
| if: always() | |
| run: | | |
| if [ -f /home/runner/work/_temp/claude-execution-output.json ]; then | |
| echo "=== Claude Execution Log ===" | |
| cat /home/runner/work/_temp/claude-execution-output.json | |
| else | |
| echo "No execution log found at /home/runner/work/_temp/claude-execution-output.json" | |
| fi | |
| - name: Post failure comment | |
| if: failure() && steps.claude.outcome == 'failure' | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '⚠️ Claude Code Review failed to complete. This could be due to API issues, rate limits, or insufficient credits. The PR can still be merged - manual review recommended.' | |
| }) |