Investigate Edge fixture container exit 135 on unchanged SDK source #194
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] | |
| issues: | |
| types: [opened, assigned] | |
| pull_request_review: | |
| types: [submitted] | |
| jobs: | |
| check-permissions: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| has-write-access: ${{ steps.check.outputs.has-write-access }} | |
| steps: | |
| - name: Check user permissions | |
| id: check | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| // Get the username of the person who triggered the event | |
| let username; | |
| if (context.eventName === 'issue_comment' || context.eventName === 'pull_request_review_comment') { | |
| username = context.payload.comment.user.login; | |
| } else if (context.eventName === 'pull_request_review') { | |
| username = context.payload.review.user.login; | |
| } else if (context.eventName === 'issues') { | |
| username = context.payload.issue.user.login; | |
| } | |
| // Check if user has write permissions | |
| try { | |
| const { data: permission } = await github.rest.repos.getCollaboratorPermissionLevel({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| username: username | |
| }); | |
| const hasWriteAccess = ['admin', 'maintain', 'write'].includes(permission.permission); | |
| console.log(`User ${username} has permission: ${permission.permission}`); | |
| core.setOutput('has-write-access', hasWriteAccess.toString()); | |
| if (!hasWriteAccess) { | |
| console.log(`User ${username} does not have write access. Claude bot will not be triggered.`); | |
| } | |
| } catch (error) { | |
| console.log(`Error checking permissions for ${username}: ${error.message}`); | |
| core.setOutput('has-write-access', 'false'); | |
| } | |
| claude: | |
| needs: check-permissions | |
| if: | | |
| needs.check-permissions.outputs.has-write-access == 'true' && | |
| ( | |
| (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'))) | |
| ) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| issues: read | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Run Claude Code | |
| id: claude | |
| # Opus 5.5 needs Claude Code >=2.1.280, newer than this action's bundled CLI. | |
| # Hold until a containing action release passes its integration tests: | |
| # https://github.com/anthropics/claude-code-action/actions/runs/35755580506 | |
| uses: anthropics/claude-code-action@be7b93b1907a4abad570368f3c74b6fe3807510b | |
| with: | |
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| claude_args: | | |
| --model claude-opus-5 |