Skip to content

Add Claude Code GitHub Workflow#299

Open
prestoncabe wants to merge 2 commits intomainfrom
add-claude-github-actions-1772136205146
Open

Add Claude Code GitHub Workflow#299
prestoncabe wants to merge 2 commits intomainfrom
add-claude-github-actions-1772136205146

Conversation

@prestoncabe
Copy link
Collaborator

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

@prestoncabe
Copy link
Collaborator Author

there are actually two workflows... one that runs when you @ mention claude, and one that automatically reviews when a PR is open... I have no idea about the usefulness of either, I just saw this feature in claude code and added it on a whim...

@Justin-MacIntosh
Copy link
Collaborator

@prestoncabe

there are actually two workflows... one that runs when you @ mention claude, and one that automatically reviews when a PR is open... I have no idea about the usefulness of either, I just saw this feature in claude code and added it on a whim...

I'm up for merging this, but depending on what the reviews are like we may want to make this an "opt-in" feature for the Devs on their PRs. Some people might not want an automatic review from Claude.

@prestoncabe
Copy link
Collaborator Author

Some people might not want an automatic review from Claude.

@Justin-MacIntosh Can you say more about what you're thinking here?

@Justin-MacIntosh
Copy link
Collaborator

Some people might not want an automatic review from Claude.

@Justin-MacIntosh Can you say more about what you're thinking here?

@prestoncabe

This is my own opinion, so take this with a grain of salt: A good chunk of code-reviewing in my experience is stylistic and subjective.

Sometimes the code doesn't work at all, in which case the review feedback can be very direct and objective, but most times reviews have to do with variable/function-naming, file organization, general readability, and adjustments to avoid issues with future features. If Claude's reviews stuck to critiques of the actual logic I wouldn't see any problem, but I worry it would start to give its "opinion" of how the code should be written stylistically and organizationally. Maybe there's some way to lock down as a team how we want to style/document/organize our code and feed it to Claude so that it follows OUR lead, but without something like that how do we avoid having an AI giving us subjective suggestions?

A temporary workaround for this, if other Devs feel similarly, would be to use PR labels or PR comments to "ping" Claude when we want a review, and to make sure that only reviews from other Devs actually block merging. I'm interested in your opinion here, though.

@prestoncabe
Copy link
Collaborator Author

Thanks @Justin-MacIntosh I think I'm curious about all of what you mentioned and assume we can modify the prompt in the workflow file over time to do more of what we like and less of what we don't. And of course we can turn it off if it is just annoying.

@prestoncabe
Copy link
Collaborator Author

gonna let this simmer for a bit to see if any others have thoughts...

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.

2 participants