-
-
Notifications
You must be signed in to change notification settings - Fork 3
Add Claude Code GitHub Workflow #4
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,64 @@ | ||||||||||||||
| name: Claude Code | ||||||||||||||
|
|
||||||||||||||
| on: | ||||||||||||||
| issue_comment: | ||||||||||||||
| types: [created] | ||||||||||||||
| pull_request_review_comment: | ||||||||||||||
| types: [created] | ||||||||||||||
| issues: | ||||||||||||||
| types: [opened, assigned] | ||||||||||||||
| pull_request_review: | ||||||||||||||
| types: [submitted] | ||||||||||||||
|
|
||||||||||||||
| jobs: | ||||||||||||||
| claude: | ||||||||||||||
| 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: read | ||||||||||||||
| pull-requests: read | ||||||||||||||
| issues: read | ||||||||||||||
|
Comment on lines
+22
to
+24
|
||||||||||||||
| contents: read | |
| pull-requests: read | |
| issues: read | |
| contents: write | |
| pull-requests: write | |
| issues: write |
Copilot
AI
Feb 27, 2026
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 .NET setup is not needed for this Unity project. The existing workflows in this repository (release.yml, test_unity_plugin.yml) use Unity-specific actions like game-ci/unity-test-runner and game-ci/unity-builder, not .NET tooling. Unity has its own runtime and doesn't require the .NET SDK to be installed separately. This setup step should be removed.
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x |
Copilot
AI
Feb 27, 2026
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.
This workflow uses actions/checkout@v4 while other workflows in the repository (release.yml, test_unity_plugin.yml) use actions/checkout@v6. For consistency with the rest of the codebase, this should be updated to v6.
| uses: actions/checkout@v4 | |
| uses: actions/checkout@v6 |
Copilot
AI
Feb 27, 2026
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 fetch-depth is set to 1, which performs a shallow clone. This could limit Claude's ability to understand the full context and history of the repository when analyzing code. Consider using a larger fetch-depth or fetch-depth: 0 (full history) to give Claude better context, similar to how the release.yml workflow uses fetch-depth: 0.
| fetch-depth: 1 | |
| fetch-depth: 0 |
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 workflow is triggered on issue_comment and pull_request_review_comment events without checking the actor's permissions. According to the PR description, only users with write access should be able to trigger Claude. Consider adding a permission check at the beginning of the job to ensure the comment author has write or admin access to the repository. This can be done using github.event.comment.author_association or by checking repository permissions explicitly.