Skip to content

feat(claude): add dispatch-review-on-agent-push input to claude.yml - #780

Merged
dem-extra1 merged 2 commits into
mainfrom
feat/claude-review-on-agent-push-opt-out-778
Aug 31, 2026
Merged

dem-extra1 merged 2 commits into
mainfrom
feat/claude-review-on-agent-push-opt-out-778

Conversation

@dem-extra1

@dem-extra1 dem-extra1 commented Aug 31, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #778

Summary

Adds the dispatch-review-on-agent-push boolean workflow_call input (default true) to claude.yml, allowing callers to opt out of automatic code reviews when Claude pushes commits or creates a PR for an issue trigger.

Changes

  1. .github/workflows/claude.yml:
    • Declares dispatch-review-on-agent-push (default true).
    • Gates Site 1 (Dispatch code review after Claude pushed commits) with inputs.dispatch-review-on-agent-push.
    • Gates Site 2 (Finalize PR for issue trigger) with [ "$DISPATCH_REVIEW_ON_AGENT_PUSH" = "true" ].
  2. Documentation:
    • Updates README.md reusable workflows table.
    • Updates website/workflows.qmd reusable workflows table.
    • Updates website/reference/claude.qmd Inputs table and Example block.
    • Updates examples/claude.yml caller stub.
  3. Changelog:
    • Adds changelog.d/claude-dispatch-review-on-agent-push-input.added.md.

@dem-extra1
dem-extra1 marked this pull request as ready for review August 31, 2026 01:54
@github-actions

github-actions Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.

2026-08-31 02:02 UTC

@github-actions

Copy link
Copy Markdown
Contributor

Claude finished review — View run


All CI checks pass. This confirms lint-workflows (actionlint) already validated the YAML syntax I checked manually.

Review: PR #780 — dispatch-review-on-agent-push input for claude.yml

Summary of changes: Adds a boolean workflow_call input (dispatch-review-on-agent-push, default true) to claude.yml, gating the two review-dispatch sites that fire without an explicit @claude review request: (1) the if: on "Dispatch code review after Claude pushed commits" (via inputs.dispatch-review-on-agent-push), and (2) a new if [ "$DISPATCH_REVIEW_ON_AGENT_PUSH" = "true" ] wrapper around the inline gh workflow run dispatch inside "Finalize PR for issue trigger". Docs synced across README.md, website/workflows.qmd, website/reference/claude.qmd, and examples/claude.yml, plus a changelog fragment.

Verification performed:

  • Confirmed both problem sites named in the linked issue (claude.yml: two review dispatches have no caller-side opt-out, so a consumer cannot make review on-request only #778) are correctly gated, and both request-gated dispatch sites ("Dispatch code review" for an explicit @claude review, and "Dispatch review for a late @claude review comment") are correctly left untouched — matching the issue's explicit requirement that @claude review keep working when this is disabled.
  • Verified the new PR_NUM variable in Site 2 is scoped entirely within the new if block and isn't referenced afterward (grep -n "PR_NUM\b"), so no leftover/undefined-variable risk.
  • Extracted the modified run: shell block and confirmed it parses cleanly with bash -n after substituting ${{ }} expressions.
  • Confirmed inputs.dispatch-review-on-agent-push used directly in an if: boolean condition matches this file's existing idiom (inputs.link-skills at line 802).
  • Confirmed [ "$DISPATCH_REVIEW_ON_AGENT_PUSH" = "true" ] matches the existing [ "$MARK_READY" = "true" ] comparison idiom in the same step.
  • Confirmed the three-site + example-stub doc-sync rule from CLAUDE.md ("Adding a new workflow_call input...") is fully satisfied: README.md table cell, website/workflows.qmd table cell, website/reference/claude.qmd Inputs table + commented Example line, and examples/claude.yml — all four updated, all in matching declaration order.
  • Grepped the repo for other review-workflow-file-adjacent doc sites; found none that also needed the new input (this isn't a new-capability tag-bootstrap case, so the @v1/@v2 versioning-prose sweep rule doesn't apply here).
  • All 40+ _selftest.yml checks pass on the PR, including lint-workflows (actionlint), which independently validates the YAML syntax I hand-checked.
  • Confirmed no prior review comment exists on this PR yet (fresh review).

Non-blocking observation: the linked issue (#778) explicitly offered two ways to close this gap — "add an early bail to site 2's inline dispatch, or lift that dispatch into the dispatch-review composite so both sites share one gate," calling the composite route "the better fix if it is cheap" since duplicated gate logic is what let the second dispatch site go unnoticed in the first place. The PR takes the early-bail route, leaving Site 2's own copy of the gha#598 --ref/workflow-file-detection logic duplicated against Site 1's composite-based copy (pre-existing duplication, not introduced by this PR, but a chance to consolidate per CLAUDE.md's own DRY guidance — "factor shared logic into reusable units rather than copying it between files" — was available and not taken). The issue itself treats this as optional, so I'm not treating it as blocking, just flagging it since it's a scoped-out alternative the issue explicitly recommended.

No bugs, no CLAUDE.md violations, no AI-prose tells, no accuracy problems found in the added prose.

Verdict

Ready for merge

I ran the authoritative check before finalizing:

python3 check-pr-fully-clean.py 780 -R Morrison-Lab/gha
❌ PR is NOT fully clean:
  - Check run 'review / claude-review' is still in status 'in_progress'
  - No automated review comments or reviews found on PR #780

Both findings are expected and self-resolving: the in_progress check run is this very review job, and "no automated review comments yet" is true only because this message is the one about to be posted as that review. There's nothing else outstanding — CI is fully green (verified earlier via gh pr checks, all ~40+ jobs passing) and my own diff review above found no bugs, no CLAUDE.md violations, and no doc-sync gaps. Once this review posts, the fully-clean check should read clean on the next pass.

To be precise about scope: my "Ready for merge" verdict below reflects my assessment of the diff's correctness and CLAUDE.md compliance, not an independent confirmation that a prior review already went clean (there wasn't one — this is the first review round on this PR).

Verdict

Ready for merge — no blocking issues found; one non-blocking suggestion noted above (Site 2 duplicates rather than reuses the dispatch-review composite's gha#598 logic, an alternative the linked issue #778 explicitly offered as optional).

Stopping Point: Clean stopping point reached — review complete and posted as this message; no further action needed from me (posting to the PR thread is handled by the calling workflow, not by me directly).

Reviewed commit: 06f3a0a

@github-actions

Copy link
Copy Markdown
Contributor

💰 Cost: $1.7609 (review) — run

@dem-extra1
dem-extra1 merged commit c5d13f4 into main Aug 31, 2026
70 checks passed
@dem-extra1
dem-extra1 deleted the feat/claude-review-on-agent-push-opt-out-778 branch August 31, 2026 02:01
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.

claude.yml: two review dispatches have no caller-side opt-out, so a consumer cannot make review on-request only

1 participant