Skip to content

Commit 65b3370

Browse files
committed
migrated to claude v1
1 parent 654c1fb commit 65b3370

6 files changed

Lines changed: 63 additions & 118 deletions

File tree

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

Lines changed: 11 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,9 @@ name: Claude Code Review
33
on:
44
pull_request:
55
types: [opened, synchronize]
6-
# Optional: Only run on specific file changes
7-
# paths:
8-
# - "src/**/*.ts"
9-
# - "src/**/*.tsx"
10-
# - "src/**/*.js"
11-
# - "src/**/*.jsx"
126

137
jobs:
148
claude-review:
15-
# Optional: Filter by PR author
16-
# if: |
17-
# github.event.pull_request.user.login == 'external-contributor' ||
18-
# github.event.pull_request.user.login == 'new-developer' ||
19-
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
209

2110
runs-on: ubuntu-latest
2211
permissions:
@@ -31,17 +20,19 @@ jobs:
3120
with:
3221
fetch-depth: 1
3322

23+
- name: Setup Python and Serena MCP
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get install -y python3 python3-pip
27+
pip3 install uv
28+
3429
- name: Run Claude Code Review
3530
id: claude-review
36-
uses: anthropics/claude-code-action@beta
31+
uses: anthropics/claude-code-action@v1
3732
with:
3833
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
3934

40-
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4.1)
41-
# model: "claude-opus-4-1-20250805"
42-
43-
# Direct prompt for automated review (no @claude mention needed)
44-
direct_prompt: |
35+
prompt: |
4536
Please review this pull request and provide feedback on:
4637
- Code quality and best practices
4738
- Potential bugs or issues
@@ -51,28 +42,6 @@ jobs:
5142
5243
Be constructive and helpful in your feedback.
5344
54-
# Optional: Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR
55-
# use_sticky_comment: true
56-
57-
# Optional: Customize review based on file types
58-
# direct_prompt: |
59-
# Review this PR focusing on:
60-
# - For TypeScript files: Type safety and proper interface usage
61-
# - For API endpoints: Security, input validation, and error handling
62-
# - For React components: Performance, accessibility, and best practices
63-
# - For tests: Coverage, edge cases, and test quality
64-
65-
# Optional: Different prompts for different authors
66-
# direct_prompt: |
67-
# ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
68-
# 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' ||
69-
# 'Please provide a thorough code review focusing on our coding standards and best practices.' }}
70-
71-
# Optional: Add specific tools for running tests or linting
72-
# allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)"
73-
74-
# Optional: Skip review for certain conditions
75-
# if: |
76-
# !contains(github.event.pull_request.title, '[skip-review]') &&
77-
# !contains(github.event.pull_request.title, '[WIP]')
78-
45+
claude_args: |
46+
--mcp-config ".github/workflows/mcp-config.json"
47+
--allowedTools mcp__context7__resolve-library-id,mcp__context7__get-library-docs,mcp__sequential-thinking__sequentialthinking,mcp__serena__find_symbol,mcp__serena__get_symbols_overview,mcp__serena__search_for_pattern,mcp__serena__find_referencing_symbols,mcp__serena__replace_symbol_body,mcp__serena__insert_after_symbol,mcp__serena__insert_before_symbol

.github/workflows/claude.yml

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,35 +30,21 @@ jobs:
3030
with:
3131
fetch-depth: 1
3232

33+
- name: Setup Python and Serena MCP
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install -y python3 python3-pip
37+
pip3 install uv
38+
3339
- name: Run Claude Code
3440
id: claude
35-
uses: anthropics/claude-code-action@beta
41+
uses: anthropics/claude-code-action@v1
3642
with:
3743
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
3844

39-
# This is an optional setting that allows Claude to read CI results on PRs
4045
additional_permissions: |
4146
actions: read
4247
43-
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4.1)
44-
# model: "claude-opus-4-1-20250805"
45-
46-
# Optional: Customize the trigger phrase (default: @claude)
47-
# trigger_phrase: "/claude"
48-
49-
# Optional: Trigger when specific user is assigned to an issue
50-
# assignee_trigger: "claude-bot"
51-
52-
# Optional: Allow Claude to run specific commands
53-
# allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)"
54-
55-
# Optional: Add custom instructions for Claude to customize its behavior for your project
56-
# custom_instructions: |
57-
# Follow our coding standards
58-
# Ensure all new code has tests
59-
# Use TypeScript for new files
60-
61-
# Optional: Custom environment variables for Claude
62-
# claude_env: |
63-
# NODE_ENV: test
64-
48+
claude_args: |
49+
--mcp-config ".github/workflows/mcp-config.json"
50+
--allowedTools mcp__context7__resolve-library-id,mcp__context7__get-library-docs,mcp__sequential-thinking__sequentialthinking,mcp__serena__find_symbol,mcp__serena__get_symbols_overview,mcp__serena__search_for_pattern,mcp__serena__find_referencing_symbols,mcp__serena__replace_symbol_body,mcp__serena__insert_after_symbol,mcp__serena__insert_before_symbol

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/mcp-config.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"mcpServers": {
3+
"context7": {
4+
"type": "http",
5+
"url": "https://mcp.context7.com/mcp",
6+
"headers": {
7+
"CONTEXT7_API_KEY": "${{ CONTEXT7_API_KEY }}"
8+
}
9+
},
10+
"sequential-thinking": {
11+
"type": "stdio",
12+
"command": "npx",
13+
"args": [
14+
"-y",
15+
"@modelcontextprotocol/server-sequential-thinking"
16+
],
17+
"env": {}
18+
},
19+
"serena": {
20+
"type": "stdio",
21+
"command": "uvx",
22+
"args": [
23+
"--from",
24+
"git+https://github.com/oraios/serena",
25+
"serena",
26+
"start-mcp-server",
27+
"--context",
28+
"ide-assistant",
29+
"--project",
30+
"."
31+
]
32+
}
33+
}
34+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
*\.sln\.DotSettings\.user
1111
*\.csproj\.user
12+
.claude/settings.local.json
1213

1314
# Verify
1415
test/**/*.received.*

Thinktecture.Runtime.Extensions.slnx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515
<File Path="README.md" />
1616
<File Path="CLAUDE.md" />
1717
</Folder>
18+
<Folder Name="/assets/.github/">
19+
<File Path=".github\workflows\claude.yml" />
20+
<File Path=".github\workflows\claude-code-review.yml" />
21+
<File Path=".github\workflows\ci.ps1" />
22+
<File Path=".github\workflows\mcp-config.json" />
23+
<File Path=".github\workflows\main.yml" />
24+
</Folder>
1825
<Folder Name="/samples/">
1926
<Project Path="samples/AspNetCore.Samples/AspNetCore.Samples.csproj" />
2027
<Project Path="samples/Basic.Samples/Basic.Samples.csproj" />

0 commit comments

Comments
 (0)