-
Notifications
You must be signed in to change notification settings - Fork 17
37 lines (35 loc) · 1.61 KB
/
chain-claude-after-copilot.yml
File metadata and controls
37 lines (35 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Chain Claude After Reviewers
on:
pull_request_review:
types: [submitted]
jobs:
claude-final-review:
if: |
github.event_name == 'pull_request_review' &&
github.event.review.user.login == 'copilot-pull-request-reviewer[bot]'
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Post Claude final review + fix request
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
const issue_number = context.payload.pull_request?.number ?? context.issue?.number;
const comments = await github.rest.issues.listComments({
issue_number,
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 100
});
if (comments.data.some(c => c.body && /@claude\b/i.test(c.body))) {
console.log('@claude already requested, skipping');
return;
}
await github.rest.issues.createComment({
issue_number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '@claude You are the FINAL reviewer. Read ALL comments above from Qodo, Coderabbit, and Copilot.\n\n**Phase 1: Review**\n1. Code follows existing tool patterns (see lumalabs_tool.py)?\n2. Lazy imports for optional deps?\n3. All options as function parameters?\n4. Proper error handling?\n\n**Phase 2: Fix valid issues**\n5. Implement fixes from other reviewers\n6. Push to THIS branch\n\n**Phase 3: Verdict**\n7. Approve or request changes'
});