Skip to content

fix: only trigger Claude review on PR open, not every push#419

Merged
carlos-alm merged 1 commit intomainfrom
fix/claude-review-trigger
Mar 12, 2026
Merged

fix: only trigger Claude review on PR open, not every push#419
carlos-alm merged 1 commit intomainfrom
fix/claude-review-trigger

Conversation

@carlos-alm
Copy link
Contributor

Summary

  • Remove synchronize from the pull_request trigger types in claude.yml so the automated review job only runs when a PR is first opened, not on every subsequent push
  • After the initial review, re-reviews require an explicit @claude comment — same pattern as Greptile's @greptileai trigger

Test plan

  • Open a new PR — Claude automated review should run
  • Push a commit to an existing PR — Claude should NOT run automatically
  • Comment @claude on a PR — interactive Claude should respond

Remove `synchronize` from pull_request trigger types so the
automated review only runs once when the PR is first opened.
Subsequent reviews require an explicit @claude mention, matching
the Greptile @greptileai trigger pattern.
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 11, 2026

Greptile Summary

This PR makes a small, targeted change to .github/workflows/claude.yml: removing synchronize from the pull_request event trigger types. As a result, the automated-review job now only runs when a PR is first opened, preventing Claude from re-reviewing the PR automatically on every subsequent push. Re-reviews can still be triggered on demand via an @claude comment, handled by the already-present interactive-claude job.

  • Trigger change: types: [opened, synchronize]types: [opened]
  • Impact: Eliminates redundant automated review runs on every push to an open PR
  • Re-review path: Developers can still get a Claude review at any time by commenting @claude on the PR
  • No functional changes to either job's logic, permissions, or prompts

Confidence Score: 5/5

  • This PR is safe to merge — it is a minimal, intentional, well-described configuration change with no risk of regressions.
  • The change is a single-word removal from a GitHub Actions event trigger list. It reduces CI noise without affecting the correctness of either the automated-review or interactive-claude jobs. The PR description clearly explains the intent, and the change matches it exactly.
  • No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/claude.yml Removes synchronize from the pull_request trigger types so the automated Claude review only fires on PR open, not on every subsequent push. No logic errors introduced; change is minimal and correct.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Developer action on PR] --> B{Event type?}

    B -->|PR opened| C[automated-review job runs]
    B -->|Push to PR\n~~synchronize~~| D[❌ No longer triggers automated-review]
    B -->|issue_comment with @claude| E[interactive-claude job runs]
    B -->|pull_request_review_comment\nwith @claude| E
    B -->|pull_request_review\nwith @claude| E
    B -->|issue opened/assigned\nwith @claude| E

    C --> F[Claude posts automated review on PR]
    E --> G[Claude responds interactively]

    style D fill:#ffcccc,stroke:#cc0000
    style C fill:#ccffcc,stroke:#009900
    style E fill:#cce5ff,stroke:#0066cc
Loading

Last reviewed commit: 762c602

@carlos-alm carlos-alm merged commit feeb036 into main Mar 12, 2026
15 of 16 checks passed
@carlos-alm carlos-alm deleted the fix/claude-review-trigger branch March 12, 2026 00:03
@github-actions github-actions bot locked and limited conversation to collaborators Mar 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant