feat(server): add message and handler for AdvanceMainTo(Commit)
All checks were successful
All checks were successful
This commit is contained in:
parent
7ed30fc382
commit
ad7d513481
1 changed files with 15 additions and 0 deletions
|
@ -122,3 +122,18 @@ impl Handler<WebhookRegistered> for RepoActor {
|
||||||
self.webhook_id.replace(msg.0);
|
self.webhook_id.replace(msg.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Message)]
|
||||||
|
#[rtype(result = "()")]
|
||||||
|
pub struct AdvanceMainTo(pub forge::Commit);
|
||||||
|
impl Handler<AdvanceMainTo> for RepoActor {
|
||||||
|
type Result = ();
|
||||||
|
fn handle(&mut self, msg: AdvanceMainTo, ctx: &mut Self::Context) -> Self::Result {
|
||||||
|
let repo_details = self.details.clone();
|
||||||
|
let addr = ctx.address();
|
||||||
|
let net = self.net.clone();
|
||||||
|
branch::advance_main(msg.0, repo_details, addr, net)
|
||||||
|
.into_actor(self)
|
||||||
|
.wait(ctx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue