You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
head gate: reviews and inline review comments do not re-run the gate #88
Found by the security lens of #85 (finding F4, low).
What happens. The head check's rules count lens reads and overrides posted as a pull request review or as an inline review comment. The head gate (fork-head-gate.yml, example caller fork-ci/actions/head-check/gate-caller.example.yml) starts only on pull_request_target, issue_comment and workflow_dispatch. So a lens that posts, edits or deletes a review or an inline comment does not re-run the gate: the check shows the older answer until the next push, issue comment or dispatch.
Why the gate does not simply listen to those events.pull_request_review and pull_request_review_comment run the workflow from the pull request's own merge commit (refs/pull/N/merge), not from the default branch. The pull request's copy of the caller would run, and the Environment that holds the App key (default branch only) refuses it, so it could never post. The README of head-check says this under "Run again after a review".
Options.
(Recommended) A workflow_run chain: a small workflow on the review events that does nothing but finish; the default branch's caller runs on workflow_run of it and dispatches the gate for the pull request number. workflow_run runs from the default branch, so the Environment allows it. The number must be read from the API (the head sha of the triggering run), never from the triggering run's own outputs.
In gate mode, count only issue comments (no reviews, no inline comments) as lens posts: simpler, but lenses that post reviews stop counting.
A scheduled backfill (for example every 15 minutes): no new trust path, but a lag.
Until then: after a lens posts or deletes a review or an inline comment, post an issue comment on the pull request or dispatch the gate with its number.
Activity
head gate: re-run after reviews and inline review comments via workfl…
head gate: #375 follow-ups (one head two PRs, docs, caller if, case t…
head gate: re-run after reviews and inline review comments via workfl…
head gate: #375 follow-ups (one head two PRs, docs, caller if, case t…
head gate: re-run after reviews and inline review comments via workfl…
head gate: #375 follow-ups (one head two PRs, docs, caller if, case t…
head gate: re-run after reviews and inline review comments via workfl…
head gate: #375 follow-ups (one head two PRs, docs, caller if, case t…
head gate: re-run after reviews and inline review comments via workfl…
head gate: #375 follow-ups (one head two PRs, docs, caller if, case t…
head gate: re-run after reviews and inline review comments via workfl…
head gate: #375 follow-ups (one head two PRs, docs, caller if, case t…