Skip to content

Commit f61de52

Browse files
authored
Merge pull request #6 from hotdata-dev/fix/checkout-ref-and-resilience
fix: specify ref, add timeout and continue-on-error
2 parents e7b4e5d + 2a65ae0 commit f61de52

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/claude-pr-review.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
# TODO: remove author filter after testing is complete
1010
if: github.event.pull_request.draft == false && github.event.pull_request.user.login == 'zfarrell'
1111
runs-on: ubuntu-latest
12+
timeout-minutes: 15
1213
permissions:
1314
contents: read
1415
pull-requests: write
@@ -29,6 +30,7 @@ jobs:
2930
- uses: actions/checkout@v4
3031
with:
3132
repository: hotdata-dev/github-workflows
33+
ref: main
3234
token: ${{ steps.app-token.outputs.token }}
3335
path: .github-workflows
3436
sparse-checkout: docs/claude-pr-review-prompt.md
@@ -43,6 +45,8 @@ jobs:
4345
echo "EOF" >> $GITHUB_OUTPUT
4446
4547
- uses: anthropics/claude-code-action@v1
48+
id: review
49+
continue-on-error: true
4650
with:
4751
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
4852
track_progress: false
@@ -53,3 +57,9 @@ jobs:
5357
${{ steps.prompt.outputs.content }}
5458
claude_args: |
5559
--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"
60+
61+
- name: Notify on review failure
62+
if: steps.review.outcome == 'failure' || steps.review.outcome == 'cancelled'
63+
run: gh pr comment ${{ github.event.pull_request.number }} --body "Automated review unavailable (Claude step failed). Please review manually."
64+
env:
65+
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)