Skip to content

Commit 5568472

Browse files
authored
Merge pull request #1 from StepKie/setup/claude-code-integration
Add Claude Code integration
2 parents 16e3cf7 + 1886f1e commit 5568472

2 files changed

Lines changed: 108 additions & 0 deletions

File tree

‎.github/workflows/claude.yml‎

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
pull_request:
13+
types: [opened, synchronize]
14+
15+
jobs:
16+
claude-interactive:
17+
if: |
18+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
19+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
20+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
21+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: write
25+
pull-requests: write
26+
issues: write
27+
id-token: write
28+
actions: read
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 1
34+
35+
- name: Run Claude Code
36+
uses: anthropics/claude-code-action@v1
37+
with:
38+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39+
40+
claude-auto-review:
41+
if: github.event_name == 'pull_request'
42+
runs-on: ubuntu-latest
43+
permissions:
44+
contents: read
45+
pull-requests: write
46+
id-token: write
47+
steps:
48+
- name: Checkout repository
49+
uses: actions/checkout@v4
50+
with:
51+
fetch-depth: 1
52+
53+
- name: Run Claude Code Review
54+
uses: anthropics/claude-code-action@v1
55+
with:
56+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
57+
prompt: |
58+
Please review this pull request for:
59+
- Code quality and Python best practices
60+
- Potential bugs or issues
61+
- Test coverage
62+
- Type hint correctness
63+
64+
Use inline comments for specific issues and a summary comment for overall feedback.
65+
claude_args: |
66+
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"

‎CLAUDE.md‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# PythonChess
2+
3+
Minimal chess program with a pygame GUI. Originally a ninth-grade school assignment, extended with additional features.
4+
5+
## Project Structure
6+
7+
- `PythonChess.py` - Main entry point (pygame GUI app)
8+
- `ChessBoard.py` - Core board logic, move generation, FEN support
9+
- `ChessPiece.py` - Piece data structures
10+
- `GameManager.py` - Game flow and move execution
11+
- `SpecialMoves.py` - En passant, castling, promotion
12+
- `BoardRenderer.py` - Pygame-based visual rendering
13+
- `Tests/` - pytest test suite
14+
- `Figuren/` - Chess piece PNG images
15+
16+
## Tech Stack
17+
18+
- Python 3.11+
19+
- pygame for GUI
20+
- pytest for tests
21+
- Type hints and dataclasses throughout
22+
23+
## Commands
24+
25+
```bash
26+
# Run the app
27+
python PythonChess.py
28+
29+
# Run tests
30+
pytest Tests/
31+
32+
# Run tests with verbose output
33+
pytest Tests/ -v
34+
```
35+
36+
## Conventions
37+
38+
- Standard Python naming: snake_case for functions/variables, PascalCase for classes
39+
- Type hints used throughout
40+
- One module per logical concern (board, pieces, rendering, game management, special moves)
41+
- Tests in `Tests/` directory using pytest fixtures
42+
- Default branch is `master`

0 commit comments

Comments
 (0)