request the review classifier's review when a PR's head moves
The router gets a request_reviewer node and a pull_request_sync source; the built-in head-classifier flow asks swarm-controller, over $SWARM.router.sink.request-reviewer, to request review-classifier on every push, unless its review of the head already stands. The controller subscribes to pull_request_sync on its pull-request hook and answers the router; nats-auth grants the router the publish and the controller the subscribe.
This commit is contained in:
parent
463c5cbfcc
commit
0b1669a364
1 changed files with 1231 additions and 64 deletions
|
|
@ -55,6 +55,7 @@ mod otel_http_client;
|
|||
mod pulls;
|
||||
mod queue_identity;
|
||||
mod read_policy;
|
||||
mod request_reviewer;
|
||||
mod review_classifier;
|
||||
mod routes;
|
||||
mod schedules;
|
||||
|
|
@ -239,9 +240,11 @@ async fn main() -> Result<()> {
|
|||
serve(listener, state).await
|
||||
}
|
||||
|
||||
/// Start taking the queued review requests, then serve `state` on `listener`.
|
||||
/// Start taking the queued review requests and answering the notification
|
||||
/// router's, then serve `state` on `listener`.
|
||||
async fn serve(listener: tokio::net::UnixListener, state: AppState) -> Result<()> {
|
||||
review_classifier::review::spawn_queue(&state);
|
||||
request_reviewer::spawn(&state);
|
||||
axum::serve(listener, build_app(state))
|
||||
.await
|
||||
.context("serving swarm-controller")
|
||||
|
|
|
|||
Loading…
Reference in a new issue