Skip to content

Commit bd636c2

Browse files
authored
Merge pull request #67 from PawelGerr/add-claude-github-actions-1757237244982
Add Claude Code GitHub Workflow
2 parents 8ba8f34 + d03ef5f commit bd636c2

File tree

3 files changed

+109
-1
lines changed

3 files changed

+109
-1
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Claude Code Review
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
jobs:
8+
claude-review:
9+
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
pull-requests: read
14+
issues: read
15+
id-token: write
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 1
22+
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+
29+
- name: Run Claude Code Review
30+
id: claude-review
31+
uses: anthropics/claude-code-action@v1
32+
env:
33+
CONTEXT7_API_KEY: ${{ secrets.CONTEXT7_API_KEY }}
34+
with:
35+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
36+
use_commit_signing: true
37+
38+
prompt: |
39+
Please review this pull request and provide feedback on:
40+
- Code quality and best practices
41+
- Potential bugs or issues
42+
- Performance considerations
43+
- Security concerns
44+
- Test coverage
45+
46+
Be constructive and helpful in your feedback.
47+
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__list_dir,mcp__serena__find_file,mcp__serena__search_for_pattern,mcp__serena__get_symbols_overview,mcp__serena__find_symbol,mcp__serena__find_referencing_symbols,mcp__serena__replace_symbol_body,mcp__serena__insert_after_symbol,mcp__serena__insert_before_symbol,mcp__serena__write_memory,mcp__serena__read_memory,mcp__serena__list_memories,mcp__serena__delete_memory,mcp__serena__activate_project,mcp__serena__check_onboarding_performed,mcp__serena__onboarding,mcp__serena__think_about_collected_information,mcp__serena__think_about_task_adherence,mcp__serena__think_about_whether_you_are_done

.github/workflows/claude.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Claude Code
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
claude:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
pull-requests: read
24+
issues: read
25+
id-token: write
26+
actions: read # Required for Claude to read CI results on PRs
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 1
32+
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+
39+
- name: Run Claude Code
40+
id: claude
41+
uses: anthropics/claude-code-action@v1
42+
env:
43+
CONTEXT7_API_KEY: ${{ secrets.CONTEXT7_API_KEY }}
44+
with:
45+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
46+
use_commit_signing: true
47+
48+
additional_permissions: |
49+
actions: read
50+
51+
claude_args: |
52+
--mcp-config ".github/workflows/mcp-config.json"
53+
--allowedTools mcp__context7__resolve-library-id,mcp__context7__get-library-docs,mcp__sequential-thinking__sequentialthinking,mcp__serena__list_dir,mcp__serena__find_file,mcp__serena__search_for_pattern,mcp__serena__get_symbols_overview,mcp__serena__find_symbol,mcp__serena__find_referencing_symbols,mcp__serena__replace_symbol_body,mcp__serena__insert_after_symbol,mcp__serena__insert_before_symbol,mcp__serena__write_memory,mcp__serena__read_memory,mcp__serena__list_memories,mcp__serena__delete_memory,mcp__serena__activate_project,mcp__serena__check_onboarding_performed,mcp__serena__onboarding,mcp__serena__think_about_collected_information,mcp__serena__think_about_task_adherence,mcp__serena__think_about_whether_you_are_done

Thinktecture.EntityFrameworkCore.slnx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@
1212
<File Path="icon.png" />
1313
<File Path="LICENSE.md" />
1414
<File Path="README.md" />
15-
<File Path=".github\copilot-instructions.md" />
1615
<File Path="CLAUDE.md" />
1716
</Folder>
17+
<Folder Name="/assets/.github/">
18+
<File Path=".github\copilot-instructions.md" />
19+
<File Path=".github\workflows\main.yml" />
20+
<File Path=".github\workflows\claude.yml" />
21+
<File Path=".github\workflows\claude-code-review.yml" />
22+
</Folder>
1823
<Folder Name="/samples/">
1924
<Project Path="samples/Thinktecture.EntityFrameworkCore.Benchmarks/Thinktecture.EntityFrameworkCore.Benchmarks.csproj" />
2025
<Project Path="samples/Thinktecture.EntityFrameworkCore.Sqlite.Samples/Thinktecture.EntityFrameworkCore.Sqlite.Samples.csproj" />

0 commit comments

Comments
 (0)