Skip to content

Comments

Add Claude Code GitHub Workflow#6

Merged
cypherkunp merged 2 commits intomainfrom
add-claude-github-actions-1767554201498
Jan 4, 2026
Merged

Add Claude Code GitHub Workflow#6
cypherkunp merged 2 commits intomainfrom
add-claude-github-actions-1767554201498

Conversation

@cypherkunp
Copy link
Owner

@cypherkunp cypherkunp commented Jan 4, 2026

🤖 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:

  • Bug fixes and improvements
  • Documentation updates
  • Implementing new features
  • Code reviews and suggestions
  • Writing tests
  • And more!

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

  • This workflow won't take effect until this PR is merged
  • @claude mentions won't work until after the merge is complete
  • The workflow runs automatically whenever Claude is mentioned in PR or issue comments
  • Claude gets access to the entire PR or issue context including files, diffs, and previous comments

Security

  • Our Anthropic API key is securely stored as a GitHub Actions secret
  • Only users with write access to the repository can trigger the workflow
  • All Claude runs are stored in the GitHub Actions run history
  • Claude's default tools are limited to reading/writing files and interacting with our repo by creating comments, branches, and commits.
  • We can add more allowed tools by adding them to the workflow file like:
allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint),Bash(npm run test)

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!


Note

Introduces Claude Code automation via GitHub Actions.

  • Adds claude-code-review.yml to auto-run Claude code reviews on PR open/sync with a focused review prompt and limited gh tools
  • Adds claude.yml to trigger Claude when @claude is mentioned in issue/PR comments or reviews, with minimal read permissions (including actions: read)

Written by Cursor Bugbot for commit 5ff2173. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Jan 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
portfolio-devvrat Ready Ready Preview, Comment Jan 4, 2026 7:18pm

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing write permissions prevents posting PR comments

The workflow sets pull-requests: read permission but the prompt instructs Claude to use gh pr comment and claude_args explicitly allows the Bash(gh pr comment:*) tool. The gh pr comment command requires pull-requests: write permission to post comments. With only read access, the comment command will fail with a permission error, making the code review workflow unable to deliver its results.

Additional Locations (1)

Fix in Cursor Fix in Web

contents: read
pull-requests: read
issues: read
id-token: write
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read-only permissions prevent creating comments and branches

The workflow sets only read permissions for contents, pull-requests, and issues. However, the PR description states Claude can create "comments, branches, and commits." These operations require write permissions (contents: write for branches/commits, pull-requests: write for PR comments, issues: write for issue comments). Without write permissions, Claude will be unable to respond or take action when mentioned.

Fix in Cursor Fix in Web

pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assigned event trigger causes duplicate Claude invocations

The issues trigger includes both opened and assigned events, but the if condition only checks if @claude exists in the issue body or title. When an issue containing @claude is later assigned to someone, the workflow re-triggers and the condition passes again since the issue body hasn't changed. This causes Claude to process and potentially respond to the same issue multiple times, leading to duplicate comments and unnecessary API costs.

Additional Locations (1)

Fix in Cursor Fix in Web

@cypherkunp cypherkunp merged commit 1e83f4e into main Jan 4, 2026
11 checks passed
@cypherkunp cypherkunp deleted the add-claude-github-actions-1767554201498 branch January 4, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant