Add Claude Code GitHub Workflow - #15
Merged
Merged
Conversation
There was a problem hiding this comment.
2 issues found across 2 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name=".github/workflows/claude.yml">
<violation number="1" location=".github/workflows/claude.yml:15">
P1: Restrict triggers to trusted users (e.g., MEMBER/OWNER/COLLABORATOR). As written, any external user can open an issue or comment `@claude` and run a workflow that uses the `CLAUDE_CODE_OAUTH_TOKEN` secret.</violation>
</file>
<file name=".github/workflows/claude-code-review.yml">
<violation number="1" location=".github/workflows/claude-code-review.yml:23">
P2: Claude Code action needs write permissions for contents/issues/pull-requests to post review comments or PR updates; read-only permissions will cause the workflow to fail.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
|
||
| jobs: | ||
| claude: | ||
| if: | |
There was a problem hiding this comment.
P1: Restrict triggers to trusted users (e.g., MEMBER/OWNER/COLLABORATOR). As written, any external user can open an issue or comment @claude and run a workflow that uses the CLAUDE_CODE_OAUTH_TOKEN secret.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/claude.yml, line 15:
<comment>Restrict triggers to trusted users (e.g., MEMBER/OWNER/COLLABORATOR). As written, any external user can open an issue or comment `@claude` and run a workflow that uses the `CLAUDE_CODE_OAUTH_TOKEN` secret.</comment>
<file context>
@@ -0,0 +1,50 @@
+
+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')) ||
</file context>
|
|
||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read |
There was a problem hiding this comment.
P2: Claude Code action needs write permissions for contents/issues/pull-requests to post review comments or PR updates; read-only permissions will cause the workflow to fail.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/claude-code-review.yml, line 23:
<comment>Claude Code action needs write permissions for contents/issues/pull-requests to post review comments or PR updates; read-only permissions will cause the workflow to fail.</comment>
<file context>
@@ -0,0 +1,44 @@
+
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ pull-requests: read
+ issues: read
</file context>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Installing Claude Code GitHub App
This PR adds a GitHub Actions workflow that enables Claude Code integration in our repository.
What is Claude Code?
Claude Code is an AI coding agent that can help with:
How it works
Once this PR is merged, we'll be able to interact with Claude by mentioning @claude in a pull request or issue comment.
Once the workflow is triggered, Claude will analyze the comment and surrounding context, and execute on the request in a GitHub action.
Important Notes
Security
There's more information in the Claude Code action repo.
After merging this PR, let's try mentioning @claude in a comment on any PR to get started!
Summary by cubic
Adds two GitHub Actions to enable Claude Code: one triggers on @claude mentions in issues and PRs, and another runs automated code reviews on PR updates. This brings on-demand help and consistent review feedback into the repo.
New Features
Migration
Written for commit c9ffd50. Summary will update on new commits.