Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/claude-assistant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ name: Claude Code Assistant
# if: |
# (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)) ||
# (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)) ||
# (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.review.author_association)) ||
# (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')) && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.issue.author_association))
# (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.review.author_association))
# permissions:
# contents: read
# issues: read
Expand Down
27 changes: 23 additions & 4 deletions .github/workflows/claude-blocking-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,22 @@ jobs:
echo "skip=false" >> "$GITHUB_OUTPUT"
fi

- name: Check for Dependabot PR
id: dependabot-check
if: steps.doc-check.outputs.skip != 'true'
run: |
if [ "${{ github.actor }}" = "dependabot[bot]" ]; then
echo "::notice::Dependabot PR — skipping AI review (version bumps are low-risk)."
echo "skip=true" >> "$GITHUB_OUTPUT"
echo "## Claude Code Review" >> "$GITHUB_STEP_SUMMARY"
echo "**Verdict:** SKIPPED (Dependabot version bump)" >> "$GITHUB_STEP_SUMMARY"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi

- name: Estimate review parameters
id: estimate
if: steps.doc-check.outputs.skip != 'true'
if: steps.doc-check.outputs.skip != 'true' && steps.dependabot-check.outputs.skip != 'true'
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ inputs.pr_number }}
Expand Down Expand Up @@ -281,7 +294,7 @@ jobs:
echo "| Timeout | ${TIMEOUT}m |" >> "$GITHUB_STEP_SUMMARY"

- name: Minimize prior review comments
if: steps.doc-check.outputs.skip != 'true'
if: steps.doc-check.outputs.skip != 'true' && steps.dependabot-check.outputs.skip != 'true'
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
Expand Down Expand Up @@ -336,7 +349,7 @@ jobs:

- name: Run Claude Code Review
id: claude-review
if: steps.doc-check.outputs.skip != 'true'
if: steps.doc-check.outputs.skip != 'true' && steps.dependabot-check.outputs.skip != 'true'
timeout-minutes: ${{ fromJSON(steps.estimate.outputs.timeout_minutes) }}
continue-on-error: true # infrastructure failure must not block merges
uses: anthropics/claude-code-action@26ec041249acb0a944c0a47b6c0c13f05dbc5b44 # v1
Expand Down Expand Up @@ -475,6 +488,7 @@ jobs:
PR_NUMBER: ${{ inputs.pr_number }}
CLAUDE_OUTCOME: ${{ steps.claude-review.outcome }}
DOC_SKIP: ${{ steps.doc-check.outputs.skip }}
DEPENDABOT_SKIP: ${{ steps.dependabot-check.outputs.skip }}
run: |
# Short-circuit: doc-only diff already wrote its summary in the
# Check for doc-only diff step. Nothing to verify, nothing to block.
Expand All @@ -483,6 +497,11 @@ jobs:
exit 0
fi

if [ "$DEPENDABOT_SKIP" = "true" ]; then
echo "Dependabot skip — no verdict required."
exit 0
fi

# Escape hatch: [skip-claude-review] or [skip-claude-review: reason] in PR body
# bypasses enforcement. The extended regex matches both the bare token and the
# documented `: reason` form advertised by our error messages. See issue #38
Expand Down Expand Up @@ -554,7 +573,7 @@ jobs:
fi

- name: Minimize PASS review comment
if: always() && steps.doc-check.outputs.skip != 'true'
if: always() && steps.doc-check.outputs.skip != 'true' && steps.dependabot-check.outputs.skip != 'true'
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]

Expand All @@ -15,8 +13,7 @@ jobs:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.review.author_association)) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')) && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.issue.author_association))
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.review.author_association))
permissions:
contents: read
issues: read
Expand Down
Loading