From a9e298c42539667a9a83130095fcfedb5e61c067 Mon Sep 17 00:00:00 2001 From: arferreira Date: Sun, 8 Mar 2026 15:00:52 -0400 Subject: [PATCH] Add GET /health endpoint for deployment probes --- src/health.rs | 13 +++++++++++++ src/lib.rs | 1 + 2 files changed, 14 insertions(+) create mode 100644 src/health.rs diff --git a/src/health.rs b/src/health.rs new file mode 100644 index 0000000..5b8f00e --- /dev/null +++ b/src/health.rs @@ -0,0 +1,13 @@ +use rapina::prelude::*; +use rapina::schemars; + +#[public] +#[get("/health")] +pub async fn health() -> Result> { + Ok(Json(HealthResponse { status: "ok" })) +} + +#[derive(Serialize, JsonSchema)] +pub struct HealthResponse { + status: &'static str, +} diff --git a/src/lib.rs b/src/lib.rs index e003860..73072d6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,6 +4,7 @@ pub mod dashboard; pub mod entity; pub mod errors; pub mod github; +mod health; mod merge_events; mod pull_requests; pub mod queue;