-
Notifications
You must be signed in to change notification settings - Fork 335
143 lines (129 loc) · 6.4 KB
/
claude-manager.yml
File metadata and controls
143 lines (129 loc) · 6.4 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: Claude Repo Manager
on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
issues:
types: [opened]
issue_comment:
types: [created]
jobs:
claude-pr-review:
if: |
github.event_name == 'pull_request' &&
(github.event.pull_request.author_association == 'OWNER' ||
github.event.pull_request.author_association == 'MEMBER' ||
github.event.pull_request.author_association == 'COLLABORATOR')
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
checks: read
statuses: read
id-token: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Wait for other checks to settle (30s)
run: sleep 30
- name: Claude PR Review & Auto-merge
uses: anthropics/claude-code-action@beta
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
allowed_non_write_users: "*"
trigger_phrase: ""
direct_prompt: |
You are the automated manager for magic-peach/reframe, a GSSoC'26 open-source project.
Follow the rules in CLAUDE.md exactly.
Current PR: #${{ github.event.pull_request.number }}
Author: @${{ github.event.pull_request.user.login }}
Title: ${{ github.event.pull_request.title }}
Base branch: ${{ github.event.pull_request.base.ref }}
Steps:
1. Fetch all CI check statuses for this PR using the GitHub API.
2. Check the Vercel deployment check status specifically.
3. Read the PR diff to review the code.
4. Verify the code follows CLAUDE.md standards:
- Uses bun.lock (not package-lock.json)
- No not-found.tsx if output:export is set
- No CSS variable renames (--bg, --surface, --border, --text, --muted must stay)
- cn() not converted to template literals
- React hooks not placed after conditional returns
- No new video-processing dependencies added
5. If ALL checks pass and code is correct: squash-merge the PR and post a comment explaining the merge.
6. If ANY check failed or code has issues: post a detailed comment tagging @${{ github.event.pull_request.user.login }} with exactly what failed and how to fix it. Do NOT merge.
claude-issue-triage:
if: github.event_name == 'issues'
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
id-token: write
steps:
- uses: actions/checkout@v6
- name: Claude Issue Triage
uses: anthropics/claude-code-action@beta
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
allowed_non_write_users: "*"
trigger_phrase: ""
direct_prompt: |
You are the automated manager for magic-peach/reframe, a GSSoC'26 open-source project.
Follow the rules in CLAUDE.md exactly.
A new issue was opened: #${{ github.event.issue.number }}
Author: @${{ github.event.issue.user.login }}
Title: ${{ github.event.issue.title }}
Steps:
1. Read the issue body via the GitHub API.
2. Post a welcoming comment that:
- Thanks @${{ github.event.issue.user.login }} for opening the issue
- Acknowledges the specific problem they reported
- Asks 1-2 targeted clarifying questions if the issue is vague or missing reproduction steps
- Mentions a maintainer will review soon
3. Apply the correct GSSoC labels. You MUST use the gh CLI to actually apply them —
do NOT mention labels in a comment instead of applying them. Run:
gh issue edit ${{ github.event.issue.number }} \
--add-label "label1,label2" \
--repo ${{ github.repository }}
Choose labels from these lists:
- Exactly ONE level:* label → level:beginner / level:intermediate / level:advanced / level:critical
- One or more type:* labels → type:bug / type:feature / type:docs / type:testing /
type:security / type:performance / type:design / type:refactor / type:devops / type:accessibility
- Always include gssoc'26
4. Read all existing comments on the issue. If anyone said "I'd like to work on this",
"can I be assigned?", "I want to take this", or similar — assign the issue to the
FIRST person who made such a request. Only assign one person.
claude-discussion-reply:
if: |
(github.event_name != 'issue_comment' || (!contains(github.event.comment.body, '/assign') && !contains(github.event.comment.body, '/unassign'))) &&
github.event_name == 'issue_comment' &&
github.event.issue.pull_request == null
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
id-token: write
steps:
- uses: actions/checkout@v6
- name: Claude Discussion Reply
uses: anthropics/claude-code-action@beta
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
allowed_non_write_users: "*"
trigger_phrase: ""
direct_prompt: |
You are the automated manager for magic-peach/reframe, a GSSoC'26 open-source project.
Follow the rules in CLAUDE.md exactly.
A comment was posted on issue #${{ github.event.issue.number }} by @${{ github.event.comment.user.login }}.
Steps:
1. Read the full issue thread (title, body, all comments) via the GitHub API.
2. Read the new comment: "${{ github.event.comment.body }}"
3. Decide if a reply is genuinely needed:
- If the commenter is asking a question → answer it specifically
- If they are requesting assignment → assign them if no one else is assigned yet, and confirm in a comment
- If it is a status update or acknowledgment that needs no reply → skip posting
4. If replying: post a concise, helpful, on-topic response. Tag @${{ github.event.comment.user.login }} if addressing them directly.
Never post generic filler responses.