[sync] Create .github/workflows/dispatch-review.yaml - #119
Closed
automation-nsheaps[bot] wants to merge 0 commit into
Closed
[sync] Create .github/workflows/dispatch-review.yaml#119automation-nsheaps[bot] wants to merge 0 commit into
automation-nsheaps[bot] wants to merge 0 commit into
Conversation
automation-nsheaps
Bot
force-pushed
the
org-sync/-github-workflows-dispatch-review-yaml
branch
from
August 13, 2026 20:47
5434c75 to
1e12939
Compare
automation-nsheaps
Bot
force-pushed
the
org-sync/-github-workflows-dispatch-review-yaml
branch
from
August 13, 2026 20:51
19eb800 to
1e12939
Compare
Contributor
There was a problem hiding this comment.
Review — Dispatch PR Review workflow template
Adds .github/workflows/dispatch-review.yaml, a thin gate that fires the shared nsheaps/agents/.github/workflows/review-dispatch.yaml decider on PR events. The file is well-scoped, well-documented, and correctly SHA-pinned. Three P2 nits below — none block; nothing critical.
Verdict: 💬 COMMENT — three P2 improvements, no P0/P1.
Scores — Correctness 8 · Simplicity 9 · Security 9 · Maintainability 7 · Docs 7
| Dimension | Score | Notes |
|---|---|---|
| Correctness | 8/10 | Gate logic works for happy path; labeled re-fires on any label change (P2). |
| Simplicity | 9/10 | Delegates all real work to the reusable workflow; template stays declarative. |
| Security | 9/10 | SHA-pinned reusable + third-party actions; least-priv scopes; automation-only creds. |
| Maintainability | 7/10 | Comment block on lines 64–67 contradicts the SHA-pin on line 68 (P2). |
| Docs / accuracy | 7/10 | Commented event-type: pr-review example refers to an input that does not exist (P2). |
Strengths
- Header (lines 1–27) is genuinely useful: role, secrets rationale, cross-repo App-install requirements, and an explicit call-out that LLM secrets live on the receiver — future readers won't have to reverse-engineer this.
- Top-level + job-level
permissionsblocks are least-privilege (contents: read,pull-requests: write,checks: write) and the top-level block is explicitly annotated as satisfying checkovCKV2_GHA_1. - Reusable workflow is SHA-pinned (
@9384e01…) with a trailing# mainref annotation — correct supply-chain posture for a template that will be synced into many consumer repos. - Third-party actions in the upstream reusable are also SHA-pinned (
actions/create-github-app-token@f8d387b…,LouisBrunner/checks-action@937cbbc…,peter-evans/repository-dispatch@28959ce…) — verified viaagent-repo/.github/workflows/review-dispatch.yaml. - Explicit
secrets:passthrough with the "secrets: inheritdoesn't pass cross-repo" comment is the right call and pre-empts a common footgun.
Follow-ups (all P2)
- 🟡 Comment/code contradiction on the
uses:pin (lines 64–68) — block describes@mainrolling-update behavior and tells operators to "replace @main with a commit SHA" for stability, but the code already IS SHA-pinned. Rewrite the comment for the actual (pinned) posture, or switchuses:back to@main. Suggestion inline. comment - 🟡
labeledre-fires on any label add to non-draft PRs (lines 33 + 52–57) — becausedraft != trueshort-circuits before the label-name check, adding an unrelated label to a ready-for-review PR re-dispatches and burns another full review (LLM tokens + runner minutes + fresh check). Tighten theif:to requirelabel.name == 'request-review'on anylabeledevent, or document that the noise is intentional. Suggestion inline. comment - 🟡 Commented example advertises an input that doesn't exist (lines 73–76) —
event-type: pr-reviewwould fail withInvalid inputif uncommented; the reusable workflow only declarestarget-repo, and the downstreamrepository_dispatchevent_type is hardcoded upstream as${{ github.event_name }}/${{ github.event.action }}. Drop the phantom line from the example. Suggestion inline. comment
How I evaluated this
- Fetched the PR metadata + diff (
gh api repos/nsheaps/github-actions/pulls/119{,/files,/reviews,/comments}) — 1 file, +76/-0, no prior reviews or inline threads to reconcile against. - Read the full new file at
/home/runner/work/.ai-agent-henry/.ai-agent-henry/trigger-repo/.github/workflows/dispatch-review.yaml(checked-out copy after sync). - Cross-checked the reusable workflow it calls at
agent-repo/.github/workflows/review-dispatch.yamlto verify (a) which inputs are actually declared — onlytarget-repo, (b) howevent_typeis derived for the dispatched event, (c) that third-party actions are SHA-pinned, and (d) that the receiver — not this gate — owns the reviewer identity + LLM secrets. This is where finding #3 comes from. - Traced each branch of the
if:condition againstgithub.event.actionvalues foropened / reopened / synchronize / ready_for_review / labeledand againstdraft = true/false— finding #2 is thelabeled + non-draft + arbitrary labelcell. - Compared the comment prose on lines 64–67 against the actual
uses:value on line 68 — finding #1. - Sanity-checked the existing repo layout (
.github/workflows/{check,pages,sync-main-to-edge,sync-plugin-specs}.yaml) to confirm this is a net-new workflow and not a modification of anything already present.
Reviewed by henry-nsheaps[bot] · run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Org-sync from nsheaps/.github
Direct push was blocked by branch protection. This PR applies the
central file update via the standard PR flow.
Path:
.github/workflows/dispatch-review.yamlAction: Create
Branch
org-sync/-github-workflows-dispatch-review-yamlis stable — subsequent runs update this PR.