Skip to content

ci: add Claude Code GitHub Action integration#152

Merged
kirich1409 merged 4 commits intodevelopfrom
feature/claude-code-integration
Feb 14, 2026
Merged

ci: add Claude Code GitHub Action integration#152
kirich1409 merged 4 commits intodevelopfrom
feature/claude-code-integration

Conversation

@kirich1409
Copy link
Copy Markdown
Collaborator

@kirich1409 kirich1409 commented Feb 14, 2026

Summary

  • Add .github/workflows/claude.yml for Claude Code integration with GitHub Actions
  • Triggers on @claude mentions in issues, PRs, and reviews
  • Only trusted collaborators (OWNER/MEMBER/COLLABORATOR) can trigger
  • Sets up JDK 21 and Gradle for Android builds
  • Dynamic checkout ref detection for correct PR context
  • Allows specific Gradle and git commands

🤖 Generated with Claude Code

Configure Claude Code integration with GitHub Actions:
- Trigger on @claude mentions in issues/PRs/reviews
- Set up JDK 17 and Gradle for Android builds
- Allow Gradle commands for check, build, format, coverage
- Include project conventions in system prompt

Based on official example from anthropics/claude-code-action

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 14, 2026 20:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds integration with Claude Code through GitHub Actions, allowing the Claude AI assistant to be invoked via @claude mentions in issues, PR comments, and reviews. The workflow is configured specifically for this Android/Gradle project with appropriate build tools and command restrictions.

Changes:

  • Added new .github/workflows/claude.yml workflow file that triggers on @claude mentions
  • Configured the workflow with JDK, Gradle, and Claude Code action setup
  • Restricted Claude's allowed commands to safe Gradle and git operations with project-specific system prompts from CLAUDE.md

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/claude.yml
Comment thread .github/workflows/claude.yml Outdated
Comment thread .github/workflows/claude.yml Outdated
Comment thread .github/workflows/claude.yml Outdated
- Use JDK 21 (matches android.yml, build.yml)
- Add Gradle cache for faster CI
- Expand allowed commands: detekt, ktlintCheck, tests, coverage
- Add git commands: status, diff, log, show
- Include sample module commands
- Update system prompt with architecture details
- Increase max-turns to 20 for complex tasks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kirich1409
Copy link
Copy Markdown
Collaborator Author

@claude review the PR

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/claude.yml
Comment thread .github/workflows/claude.yml
Comment thread .github/workflows/claude.yml Outdated
Comment thread .github/workflows/claude.yml Outdated
Comment thread .github/workflows/claude.yml Outdated
Comment thread .github/workflows/claude.yml Outdated
kirich1409 and others added 2 commits February 15, 2026 00:13
- Add author_association check (OWNER/MEMBER/COLLABORATOR only)
- Remove id-token: write permission (not needed)
- Remove fetch-depth: 1, add dynamic ref detection for PR contexts
- Add chmod +x gradlew step before Gradle commands

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove custom determine-ref step (action handles checkout internally)
- Remove @claude mention checks from if (action filters mentions itself)
- Keep author_association gate as the only custom security check

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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