Skip to content

test(driver): cover deadline call sites #473

test(driver): cover deadline call sites

test(driver): cover deadline call sites #473

Workflow file for this run

name: Claude PR Review
on:
pull_request:
types: [opened, ready_for_review]
issue_comment:
types: [created]
jobs:
authorize:
# Payload-only pre-filter: no API call for bots / drafts / skip-label.
# Bots excluded HERE (not via the permission check) so they're skipped
# even if a bot account is ever granted write access.
if: >
(
github.event_name == 'pull_request' &&
github.event.pull_request.draft == false &&
github.event.pull_request.user.type != 'Bot' &&
!contains(github.event.pull_request.labels.*.name, 'skip-claude-review')
) || (
github.event_name == 'issue_comment' &&
github.event.issue.pull_request != null &&
github.event.comment.user.type != 'Bot' &&
contains(github.event.comment.body, '@claude')
)
runs-on: ubuntu-latest
outputs:
allowed: ${{ steps.check.outputs.allowed }}
steps:
- id: check
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
AUTHOR: ${{ github.event.pull_request.user.login || github.event.comment.user.login }}
run: |
allowed=$(gh api "repos/$REPO/collaborators/$AUTHOR/permission" \
--jq '.user.permissions.push' 2>/dev/null || echo false)
echo "allowed=$allowed" >> "$GITHUB_OUTPUT"
review:
needs: authorize
if: needs.authorize.outputs.allowed == 'true'
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
pull-requests: write
issues: write
id-token: write
actions: read
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
# Full history lets the action compute an accurate diff vs the base
# branch instead of just the latest commit.
fetch-depth: 0
- uses: anthropics/claude-code-action@4633baf5267540f3f8cb58b684f79901d564c280 # v1.0.160
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
trigger_phrase: "@claude"
track_progress: true
claude_args: |
--model claude-opus-4-8
--max-turns 30
--allowedTools "mcp__github_inline_comment__create_inline_comment"
prompt: |
Review this PR. Post each issue as an INLINE comment on the exact file and
line using the create_inline_comment tool. Follow the pr-review skill if available.