Skip to content

PMM-7 Add Claude Code GitHub Actions workflow#5633

Open
ademidoff wants to merge 1 commit into
mainfrom
PMM-7-add-anthropic-workflow
Open

PMM-7 Add Claude Code GitHub Actions workflow#5633
ademidoff wants to merge 1 commit into
mainfrom
PMM-7-add-anthropic-workflow

Conversation

@ademidoff

@ademidoff ademidoff commented Jul 12, 2026

Copy link
Copy Markdown
Member

What

Adds .github/workflows/claude.yml — a tag workflow that lets trusted collaborators trigger Claude by mentioning @claude in a PR or issue comment (e.g. @claude review this PR).

How it works

  • Triggers on issue_comment and pull_request_review_comment (created).
  • The job only runs when the comment contains @claude and the author's association is OWNER, MEMBER, or COLLABORATOR. This prevents external fork contributors on this public repo from invoking Claude and spending our API budget.
  • Authenticates via the ANTHROPIC_API_KEY secret.
  • Actions are SHA-pinned with version comments to match the repo's existing convention (Scorecard-friendly, Dependabot-updatable).

Prerequisites (must be done by a repo/org admin before this works)

  • Install the Claude GitHub App on percona/pmm (https://github.com/apps/claude), granting Contents / Pull requests / Issues read-write.
  • Add an ANTHROPIC_API_KEY secret (repo or percona org level, scoped to this repo).

Once both are in place, commenting @claude ... on any PR will trigger the workflow. A separate automatic-review workflow (on pull_request) can be added later if desired.

Adds a tag workflow that lets trusted collaborators trigger Claude by
mentioning @claude in a PR or issue comment (e.g. to request a review).

- Triggers on issue_comment and pull_request_review_comment.
- Gated to OWNER/MEMBER/COLLABORATOR author association so external fork
  contributors on this public repo cannot invoke it.
- Authenticates via the ANTHROPIC_API_KEY repo/org secret.
- Actions are SHA-pinned to match repo conventions.

Requires the Claude GitHub App to be installed on the repo and an
ANTHROPIC_API_KEY secret to be configured.
@ademidoff ademidoff requested a review from a team as a code owner July 12, 2026 12:05
@ademidoff ademidoff requested review from 4nte and maxkondr and removed request for a team July 12, 2026 12:05
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.81%. Comparing base (31318c7) to head (49da694).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5633      +/-   ##
==========================================
+ Coverage   43.59%   43.81%   +0.22%     
==========================================
  Files         415      415              
  Lines       43134    42893     -241     
==========================================
- Hits        18804    18795       -9     
+ Misses      22454    22225     -229     
+ Partials     1876     1873       -3     
Flag Coverage Δ
admin 34.78% <ø> (ø)
agent 49.15% <ø> (+0.11%) ⬆️
managed 43.28% <ø> (+0.29%) ⬆️
vmproxy 72.22% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new GitHub Actions workflow to enable invoking Claude Code via @claude mentions on PR/issue comments, with gating to trusted collaborator associations to control secret/API usage in a public repository.

Changes:

  • Introduces .github/workflows/claude.yml triggered by issue_comment and pull_request_review_comment creation events.
  • Adds an if: guard requiring @claude in the comment body and OWNER|MEMBER|COLLABORATOR author association.
  • Runs the anthropics/claude-code-action with ANTHROPIC_API_KEY and elevated job permissions.

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

Comment on lines +35 to +39
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 1

Comment on lines +24 to +25
runs-on: ubuntu-latest

Comment on lines +9 to +12

permissions:
contents: read

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