Skip to content

[iris] Add --preemptible flag to job run #6483

[iris] Add --preemptible flag to job run

[iris] Add --preemptible flag to job run #6483

Workflow file for this run

name: Claude PR Review
on:
pull_request:
types: [opened, ready_for_review, reopened]
issue_comment:
# NOTE: there's no PR comment specific event, so instead we need to check all comments and filter in the job.
# This is annoying and wasteful, but afaiu there's no better way in GH Actions.
types: [created]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.issue.number }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
review:
if: >-
(
github.event_name == 'pull_request' &&
(
github.event.pull_request.author_association == 'OWNER' ||
github.event.pull_request.author_association == 'MEMBER' ||
github.event.pull_request.author_association == 'COLLABORATOR'
)
) ||
(
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, 'claude review this') &&
(
github.event.comment.author_association == 'OWNER' ||
github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'COLLABORATOR'
)
)
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
pull-requests: write
issues: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Run Claude Review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN || secrets.CLAUDE_MAX_OAUTH_TOKEN }}
track_progress: ${{ github.event_name == 'pull_request' }}
prompt: |
/github-pr-review --comment ${{ github.event.pull_request.number || github.event.issue.number }}
${{ github.event_name == 'issue_comment' && format('EXTRA INSTRUCTIONS FROM COMMENT:\n{0}', github.event.comment.body) || '' }}
claude_args: |
--model opus
--max-turns 200
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*),Bash(gh pr review:*)"
allowed_bots: 'claude[bot]'