swarm: the notification router tells a PR's author when CI on it fails or is cancelled
This commit is contained in:
parent
d4e58f8741
commit
c8eaa93268
2 changed files with 490 additions and 60 deletions
|
|
@ -437,8 +437,9 @@ itself, all under `https://<swarm.domain>/webhook/forge/`:
|
|||
the [review classifier](../../4-implementation/swarm/review-classifier.md#trigger-and-lifecycle)
|
||||
- instance-wide `issues` + `issue_assign` and `pull_request` +
|
||||
`pull_request_assign` + `pull_request_sync` + `pull_request_review_approved` +
|
||||
`pull_request_review_rejected` + `pull_request_review_comment` system hooks, whose deliveries it
|
||||
keeps in the `SWARM_EVENTS` stream for the
|
||||
`pull_request_review_rejected` + `pull_request_review_comment` system hooks, and
|
||||
an instance-wide `workflow_run_failure` + `workflow_run_cancelled` system hook,
|
||||
whose deliveries it keeps in the `SWARM_EVENTS` stream for the
|
||||
[notification router](../../4-implementation/swarm/notify-router.md#the-path)
|
||||
|
||||
The controller **interprets** a delivery and sends hives a specific
|
||||
|
|
|
|||
|
|
@ -595,11 +595,13 @@ that sets `deploy.notify-router.enable`. `allSwarmServices` defaults it on
|
|||
wherever the host has the router's store identity, on the review classifier's
|
||||
terms. Run one: it handles each issue's events in order.
|
||||
|
||||
swarm-controller keeps every `issues` and `pull_request` delivery from its
|
||||
instance-wide hooks in the `SWARM_EVENTS` stream. The router reads that
|
||||
swarm-controller keeps every `issues` and `pull_request` delivery, and every
|
||||
failed or cancelled CI run, from its instance-wide hooks in the `SWARM_EVENTS`
|
||||
stream. The router reads that
|
||||
stream and queues todos for the agents an event concerns: an agent assigned to
|
||||
an issue or pull request gets a todo, one taken off it gets that todo rewritten
|
||||
to say so, and closing it clears them. A push to an open pull request makes
|
||||
to say so, and closing it clears them. The author of a pull request gets a todo
|
||||
when a CI run on it fails or gets cancelled, and a push to the branch clears it. A push to an open pull request makes
|
||||
it ask swarm-controller to request the review classifier's review. Each agent's harness takes its todos
|
||||
from the `ROUTER_TODOS` stream, so an agent that's down gets them when it's
|
||||
back.
|
||||
|
|
|
|||
Loading…
Reference in a new issue