Skip to content

Add Claude PR review GitHub Action#2771

Open
weirdwiz wants to merge 1 commit into
red-hat-storage:masterfrom
weirdwiz:add-claude-pr-review-upstream
Open

Add Claude PR review GitHub Action#2771
weirdwiz wants to merge 1 commit into
red-hat-storage:masterfrom
weirdwiz:add-claude-pr-review-upstream

Conversation

@weirdwiz
Copy link
Copy Markdown
Contributor

@weirdwiz weirdwiz commented May 8, 2026

  • Adds automated PR reviews using Claude (Sonnet 4.6) via Google Vertex AI
  • Follows patterns from openshift/console (CLAUDE.md → AGENTS.md) and openshift/oc (.claude/agents/code-reviewer.md)
  • Reviews trigger once on PR open, not on every push — use @claude to re-review after fixes
  • Requires repo admin to add GCP_CREDENTIALS secret and ANTHROPIC_VERTEX_PROJECT_ID/CLOUD_ML_REGION variables

Automated PR reviews using Claude via Google Vertex AI, following
openshift/console and openshift/oc patterns.

Workflow (.github/workflows/claude-pr-review.yml):
- Triggers on PR opened/ready_for_review/reopened (not on every push)
- Responds to @claude mentions from MEMBER/OWNER/COLLABORATOR
- Skips draft PRs, 15min timeout, cancel-in-progress per event type
- All actions pinned to commit SHA for supply chain security
- GCP credentials via ADC, cleaned up on exit
- Project ID and region from GitHub Actions variables

Agent (.claude/agents/code-reviewer.md):
- PatternFly 6 compliance (--pf-t--global--* tokens)
- Console SDK data fetching patterns (useK8sWatchResource, k8s*)
- TypeScript/React, i18n, cross-package, security checks
- Does not run build/lint/test (handled by Sanity Checks workflow)

Context (CLAUDE.md -> AGENTS.md):
- Follows openshift/console pattern for AI context files
- Project conventions, commands, common pitfalls

Required setup:
- GitHub secret: GCP_CREDENTIALS (GCP ADC JSON for Vertex AI)
- GitHub variables: ANTHROPIC_VERTEX_PROJECT_ID, CLOUD_ML_REGION
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 8, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: weirdwiz
Once this PR has been reviewed and has the lgtm label, please assign sanjalkatiyar for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 8, 2026

@weirdwiz: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/odf-console-e2e-aws 7d05a0f link true /test odf-console-e2e-aws

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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