Skip to content

Add Claude Code GitHub Workflow#32

Merged
ThalesMMS merged 2 commits intomasterfrom
add-claude-github-actions-1757970808424
Sep 15, 2025
Merged

Add Claude Code GitHub Workflow#32
ThalesMMS merged 2 commits intomasterfrom
add-claude-github-actions-1757970808424

Conversation

@ThalesMMS
Copy link
Owner

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

@ThalesMMS ThalesMMS merged commit 1d94167 into master Sep 15, 2025
1 check passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines +21 to +26
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write

Choose a reason for hiding this comment

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

[P1] Grant write permission so review can comment on PRs

The job tells Claude to post feedback via gh pr comment, but the workflow only requests pull-requests: read (and issues: read). The GITHUB_TOKEN generated for this job will therefore be read‑only and gh pr comment will fail with a 403, preventing any review from being published. Bump the permission to pull-requests: write so the action can actually add the comment.

Useful? React with 👍 / 👎.

Comment on lines +21 to +26
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
actions: read # Required for Claude to read CI results on PRs

Choose a reason for hiding this comment

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

[P1] Allow Claude workflow to write back to issues and PRs

This workflow is triggered by @claude mentions but only grants pull-requests: read and issues: read. Without write access the action cannot post the response comment or modify issue/PR state, so every invocation will either fail or be unable to report results. Grant at least pull-requests: write and issues: write to the job’s token so Claude can reply to the request.

Useful? React with 👍 / 👎.

@ThalesMMS
Copy link
Owner Author

@codex fix comments

@chatgpt-codex-connector
Copy link

Summary

Testing

  • ⚠️ Tests not run (workflow-only change).

View task →

@ThalesMMS ThalesMMS deleted the add-claude-github-actions-1757970808424 branch September 15, 2025 21:52
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