Skip to content

Commit 85d264f

Browse files
authored
Merge pull request #31 from FraxFinance/ci/workflows
CI: add agentic workflows
2 parents 13667df + a2977c2 commit 85d264f

File tree

6 files changed

+113
-1
lines changed

6 files changed

+113
-1
lines changed

.claude/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"attribution": {
3+
"commit": "",
4+
"pr": ""
5+
},
6+
"permissions": {
7+
"allow": ["Read", "Edit", "Write", "WebSearch", "WebFetch"],
8+
"deny": ["Read(./.env)", "Read(./.env.*)"]
9+
}
10+
}

.codexignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.env
2+
.env.*

.copilotignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.env
2+
.env.*

.github/workflows/claude.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Claude Code
2+
3+
on:
4+
# Auto-review PRs to master
5+
pull_request:
6+
types: [opened, synchronize, ready_for_review, reopened]
7+
branches:
8+
- master
9+
10+
# @claude mentions in PR comments
11+
issue_comment:
12+
types: [created]
13+
pull_request_review_comment:
14+
types: [created]
15+
pull_request_review:
16+
types: [submitted]
17+
18+
jobs:
19+
# Auto-review PRs targeting master
20+
auto-review:
21+
if: github.event_name == 'pull_request' && !github.event.pull_request.draft
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
25+
pull-requests: write
26+
id-token: write
27+
steps:
28+
- uses: actions/checkout@v6
29+
with:
30+
fetch-depth: 1
31+
32+
- uses: anthropics/claude-code-action@v1
33+
with:
34+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
35+
track_progress: true
36+
use_sticky_comment: true
37+
prompt: |
38+
REPO: ${{ github.repository }}
39+
PR NUMBER: ${{ github.event.pull_request.number }}
40+
41+
Perform a comprehensive code review focusing on:
42+
- Code quality and best practices
43+
- Potential bugs or security issues
44+
- Performance considerations
45+
- Test coverage
46+
47+
Use inline comments for specific issues.
48+
Use top-level comments for general observations.
49+
50+
claude_args: |
51+
--allowedTools "Read,mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"
52+
--max-turns 15
53+
54+
# Respond to @claude mentions (members only, PRs only)
55+
mention-response:
56+
if: |
57+
(
58+
github.event_name == 'issue_comment' &&
59+
github.event.issue.pull_request &&
60+
contains(github.event.comment.body, '@claude') &&
61+
(
62+
github.event.comment.author_association == 'MEMBER' ||
63+
github.event.comment.author_association == 'COLLABORATOR'
64+
)
65+
) ||
66+
(
67+
github.event_name == 'pull_request_review_comment' &&
68+
contains(github.event.comment.body, '@claude') &&
69+
(
70+
github.event.comment.author_association == 'MEMBER' ||
71+
github.event.comment.author_association == 'COLLABORATOR'
72+
)
73+
) ||
74+
(
75+
github.event_name == 'pull_request_review' &&
76+
contains(github.event.review.body, '@claude') &&
77+
(
78+
github.event.review.author_association == 'MEMBER' ||
79+
github.event.review.author_association == 'COLLABORATOR'
80+
)
81+
)
82+
runs-on: ubuntu-latest
83+
permissions:
84+
contents: read
85+
pull-requests: write
86+
id-token: write
87+
steps:
88+
- uses: actions/checkout@v6
89+
with:
90+
fetch-depth: 1
91+
92+
- uses: anthropics/claude-code-action@v1
93+
with:
94+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
95+
claude_args: |
96+
--allowedTools "Read,mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"
97+
--max-turns 10

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
env:
1414
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
15+
FRAXTAL_RPC_URL: "https://rpc.frax.com"
1516
FOUNDRY_PROFILE: "test"
1617
steps:
1718
- uses: actions/setup-node@v2

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
"outDir": "dist"
1919
},
2020
"exclude": ["node_modules"],
21-
"include": ["script/**/*"]
21+
"include": ["script/**/*", "scripts/**/*"]
2222
}

0 commit comments

Comments
 (0)