Fix error reported on the wrong line #322
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 React on comment" | |
| on: | |
| issue_comment: | |
| types: [created] | |
| pull_request_review: | |
| types: [submitted] | |
| pull_request_review_comment: | |
| types: [created] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| issues: write | |
| actions: read | |
| concurrency: | |
| group: claude-pr-reactions-${{ github.event.pull_request.number || github.event.issue.number }} | |
| cancel-in-progress: false | |
| jobs: | |
| check-trigger: | |
| name: "Check trigger phrase" | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 1 | |
| outputs: | |
| triggered: ${{ steps.check.outputs.triggered }} | |
| steps: | |
| - name: "Check for trigger phrase" | |
| id: check | |
| env: | |
| COMMENT_BODY: ${{ github.event.comment.body || github.event.review.body || '' }} | |
| run: | | |
| if [ "${{ github.event.comment.user.login || github.event.review.user.login || '' }}" = "phpstan-bot" ]; then | |
| echo "triggered=false" >> "$GITHUB_OUTPUT" | |
| elif echo "$COMMENT_BODY" | grep -qF "@phpstan-bot"; then | |
| echo "triggered=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "triggered=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| react: | |
| name: "React on comment" | |
| needs: check-trigger | |
| if: needs.check-trigger.outputs.triggered == 'true' | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 60 | |
| steps: | |
| - name: "Checkout" | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.PHPSTAN_BOT_TOKEN }} | |
| - name: "Install PHP" | |
| uses: "shivammathur/setup-php@v2" | |
| with: | |
| coverage: "none" | |
| php-version: "8.4" | |
| ini-file: development | |
| extensions: mbstring | |
| - uses: "ramsey/composer-install@v3" | |
| - name: "React to feedback" | |
| uses: anthropics/claude-code-action@v1 | |
| with: | |
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | |
| github_token: ${{ secrets.PHPSTAN_BOT_TOKEN }} | |
| trigger_phrase: "@phpstan-bot" | |
| claude_args: "--model claude-opus-4-6" | |
| bot_name: "phpstan-bot" | |
| bot_id: "79867460" | |
| additional_permissions: | | |
| actions: read |