Add debug statements to know which branch got triggered

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2024-07-14 01:02:35 +02:00
parent bdbc8b6382
commit 9f55b37f34
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -75,7 +75,9 @@ async fn hooks_inner(req: Request<Incoming>, secret: &str) -> Result<Hook, Error
let hook: ForgejoHook = serde_json::from_slice(&payload[..])?; let hook: ForgejoHook = serde_json::from_slice(&payload[..])?;
return Ok(Hook::Forgejo(hook)); return Ok(Hook::Forgejo(hook));
debug!("Found Forgejo payload.");
} else if let Some(val) = headers.get("X-Gitlab-Token") { } else if let Some(val) = headers.get("X-Gitlab-Token") {
debug!("Found Gitlab payload");
if secret != val { if secret != val {
return Err(Error::InvalidSecret); return Err(Error::InvalidSecret);
} }