swarm-controller: count default-branch merges and lines per repo
This commit is contained in:
parent
c25cf3d48a
commit
2e23f3debf
1 changed files with 576 additions and 6 deletions
|
|
@ -641,6 +641,12 @@ pub(super) async fn post_webhook_forge(
|
|||
DeliveryKind::VcsActivity => {
|
||||
if let Some(activity) = crate::vcs_metrics::parse_push(&body) {
|
||||
crate::vcs_metrics::record_push(&activity);
|
||||
// The compare runs after the delivery is answered, so a slow
|
||||
// or failing forge never delays or fails the webhook.
|
||||
let forge = state.forge.get().map(Arc::clone);
|
||||
tokio::spawn(crate::vcs_metrics::count_default_branch_push(
|
||||
activity, forge,
|
||||
));
|
||||
} else {
|
||||
tracing::warn!("webhook: vcs-activity delivery did not parse as a push payload");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue