Watch
0
0
Fork
You've already forked hyperhive
0

request the review classifier when a pr is opened or reopened

This commit is contained in:
atlas 2026-10-28 03:31:38 +01:00 • committed by mara
commit b1a00a3222
2 changed files with 110 additions and 38 deletions

View file

@ -79,7 +79,8 @@ levels deep, and 100 custom flows. A `todo` node sends to the agents an event
field holds (`assignees_added`, `todo_holders`, …) or to one named agent.
The router ships the three flows above, each a source → match on `action` →
todo, and `head-classifier`: source `pull_request_sync` → `request_reviewer`
todo, and `head-classifier`: source `pull_request` and `pull_request_sync` →
match on `action` (`opened`, `reopened`, `synchronized`) → `request_reviewer`
for `review-classifier` ([below](#requesting-a-review)). The code defines them
(`swarm_wire::notify_flows::builtins`), so a build that changes one reaches
every swarm. Each switches off on `/notifications`. A custom flow has the same type and
@ -150,8 +151,9 @@ not retried: the next push asks again. A request repeated for the same head is
harmless: a reviewer with a pending request is a no-op for the forge, and one
who has reviewed gets `skipped`.
`head-classifier` requests the review classifier's review on a push to any open
PR. The classifier then runs as it does for any requested review
`head-classifier` requests the review classifier's review when someone opens or
reopens a PR and on every push to an open PR. The classifier then runs as it does
for any requested review
([`review-classifier.md`](review-classifier.md#trigger-and-lifecycle)), through
its own request queue, which replaces a waiting request for the same PR. A
repo the classifier's account can't read, or a PR that account opened, answers

View file

@ -86,9 +86,10 @@ as a reviewer on a PR starts a run:
4. The controller posts the result on the PR as the service account's
review, on the commit it read.
A push starts no run by itself. The notification router's `head-classifier`
flow requests the account's review on every push to an open PR, unless its
review of the new head already stands ([`notify-router.md`](notify-router.md#requesting-a-review)).
Opening or pushing to a PR starts no run by itself. The notification router's
`head-classifier` flow requests the account's review when someone opens or
reopens a PR and on every push to an open PR, unless its review of the new head
already stands ([`notify-router.md`](notify-router.md#requesting-a-review)).
When a post can't reach the secret store or the forge, because the
connection fails or a try gets no answer within two minutes, the controller