Skip to content
Merged
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
14 changes: 13 additions & 1 deletion .github/workflows/claude-pr-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ jobs:
with:
fetch-depth: 1

- name: Auto-approve Dependabot bump
if: github.actor == 'dependabot[bot]'
run: gh pr review ${{ github.event.pull_request.number }} --approve --body "Automated dependency bump — auto-approved."
env:
GH_TOKEN: ${{ github.token }}

- name: Generate GitHub App token
if: github.actor != 'dependabot[bot]'
id: app-token
uses: actions/create-github-app-token@v3.2.0
with:
Expand All @@ -31,6 +38,7 @@ jobs:
owner: hotdata-dev

- uses: actions/checkout@v6.0.2
if: github.actor != 'dependabot[bot]'
with:
repository: hotdata-dev/github-workflows
ref: main
Expand All @@ -40,6 +48,7 @@ jobs:
sparse-checkout-cone-mode: false

- name: Load review prompt
if: github.actor != 'dependabot[bot]'
id: prompt
run: |
PROMPT=$(cat .github-workflows/docs/claude-pr-review-prompt.md)
Expand All @@ -48,9 +57,11 @@ jobs:
echo "EOF" >> $GITHUB_OUTPUT

- name: Verify jq is available
if: github.actor != 'dependabot[bot]'
run: jq --version

- name: Gather review context
if: github.actor != 'dependabot[bot]'
id: context
run: |
PR_NUMBER=${{ github.event.pull_request.number }}
Expand Down Expand Up @@ -85,6 +96,7 @@ jobs:
GH_TOKEN: ${{ github.token }}

- uses: anthropics/claude-code-action@v1
if: github.actor != 'dependabot[bot]'
id: review
continue-on-error: true
with:
Expand All @@ -107,7 +119,7 @@ jobs:
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr review:*),Read"

- name: Notify on review failure
if: steps.review.outcome == 'failure' || steps.review.outcome == 'cancelled'
if: github.actor != 'dependabot[bot]' && (steps.review.outcome == 'failure' || steps.review.outcome == 'cancelled')
run: gh pr comment ${{ github.event.pull_request.number }} --body "Automated review unavailable (Claude step failed). Please review manually."
env:
GH_TOKEN: ${{ github.token }}
Loading