-
Notifications
You must be signed in to change notification settings - Fork 0
Add Claude Code integration #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,66 @@ | ||||||
| name: Claude Code | ||||||
|
|
||||||
| on: | ||||||
| issue_comment: | ||||||
| types: [created] | ||||||
| pull_request_review_comment: | ||||||
| types: [created] | ||||||
| issues: | ||||||
| types: [opened, assigned] | ||||||
| pull_request_review: | ||||||
| types: [submitted] | ||||||
| pull_request: | ||||||
| types: [opened, synchronize] | ||||||
|
|
||||||
| jobs: | ||||||
| claude-interactive: | ||||||
| if: | | ||||||
| (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || | ||||||
| (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || | ||||||
| (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || | ||||||
| (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) | ||||||
| runs-on: ubuntu-latest | ||||||
| permissions: | ||||||
| contents: write | ||||||
| pull-requests: write | ||||||
| issues: write | ||||||
| id-token: write | ||||||
| actions: read | ||||||
| steps: | ||||||
| - name: Checkout repository | ||||||
| uses: actions/checkout@v4 | ||||||
| with: | ||||||
| fetch-depth: 1 | ||||||
|
|
||||||
| - name: Run Claude Code | ||||||
| uses: anthropics/claude-code-action@v1 | ||||||
|
||||||
| with: | ||||||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||||||
|
|
||||||
| claude-auto-review: | ||||||
| if: github.event_name == 'pull_request' | ||||||
|
Comment on lines
+16
to
+41
|
||||||
| runs-on: ubuntu-latest | ||||||
| permissions: | ||||||
| contents: read | ||||||
| pull-requests: write | ||||||
| id-token: write | ||||||
| steps: | ||||||
| - name: Checkout repository | ||||||
| uses: actions/checkout@v4 | ||||||
| with: | ||||||
| fetch-depth: 1 | ||||||
|
|
||||||
| - name: Run Claude Code Review | ||||||
| uses: anthropics/claude-code-action@v1 | ||||||
|
||||||
| with: | ||||||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||||||
| prompt: | | ||||||
| Please review this pull request for: | ||||||
| - Code quality and Python best practices | ||||||
| - Potential bugs or issues | ||||||
| - Test coverage | ||||||
| - Type hint correctness | ||||||
|
|
||||||
| Use inline comments for specific issues and a summary comment for overall feedback. | ||||||
| claude_args: | | ||||||
| --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)" | ||||||
|
Comment on lines
+65
to
+66
|
||||||
| claude_args: | | |
| --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)" |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,42 @@ | ||||||
| # PythonChess | ||||||
|
|
||||||
| Minimal chess program with a pygame GUI. Originally a ninth-grade school assignment, extended with additional features. | ||||||
|
|
||||||
| ## Project Structure | ||||||
|
|
||||||
| - `PythonChess.py` - Main entry point (pygame GUI app) | ||||||
| - `ChessBoard.py` - Core board logic, move generation, FEN support | ||||||
| - `ChessPiece.py` - Piece data structures | ||||||
| - `GameManager.py` - Game flow and move execution | ||||||
| - `SpecialMoves.py` - En passant, castling, promotion | ||||||
|
||||||
| - `BoardRenderer.py` - Pygame-based visual rendering | ||||||
| - `Tests/` - pytest test suite | ||||||
| - `Figuren/` - Chess piece PNG images | ||||||
|
|
||||||
| ## Tech Stack | ||||||
|
|
||||||
| - Python 3.11+ | ||||||
|
||||||
| - Python 3.11+ | |
| - Python 3.7+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
claude-interactivejob hascontents: writepermission, which allows modifying repository contents. If this job only needs to respond to comments in PRs and issues,contents: readshould be sufficient. Granting write access to contents increases the security risk if the action or token is compromised. Review whether write access to contents is actually needed for the interactive mode, or if it can be downgraded to read-only.