From 18e7c406b0aa4ee769351e580c6c9adccb8c4bfa Mon Sep 17 00:00:00 2001 From: atlas Date: Sat, 11 Jul 2026 11:05:42 +0200 Subject: [PATCH] fix(#2377): doc_markdown + too_many_lines clippy lints - Backtick-quote `pull_request` in doc comments (4x doc_markdown) - Add #[allow(clippy::too_many_lines)] to server::dispatch (101/100; +1 line from submit_kind fetched_sha param in 5dd0a36f) --- hive-c0re/src/dashboard/webhook.rs | 6 +++--- hive-c0re/src/forge/mod.rs | 2 +- hive-c0re/src/server.rs | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hive-c0re/src/dashboard/webhook.rs b/hive-c0re/src/dashboard/webhook.rs index 35afc781..c5024d5c 100644 --- a/hive-c0re/src/dashboard/webhook.rs +++ b/hive-c0re/src/dashboard/webhook.rs @@ -2,7 +2,7 @@ //! //! - **`/webhook/knowledge`** — push events on `internal/knowledge` trigger a //! `git pull` on the local clone so agents see up-to-date docs. -//! - **`/webhook/config-pr`** — pull_request events on any `agent-configs/*` +//! - **`/webhook/config-pr`** — `pull_request` events on any `agent-configs/*` //! repo queue a [`hive_sh4re::ApprovalKind::MergeConfigPr`] approval row //! so the operator can review + approve the merge from the dashboard. //! @@ -77,7 +77,7 @@ pub(super) async fn post_webhook_knowledge( // ── config-PR webhook ────────────────────────────────────────────────────────── -/// Minimal Forgejo pull_request-webhook payload. +/// Minimal Forgejo `pull_request`-webhook payload. /// /// Forgejo fires this for actions: `opened`, `closed`, `reopened`, /// `synchronize`, `assigned`, `unassigned`, `label_updated`, @@ -109,7 +109,7 @@ struct PrWebhookRepo { full_name: Option, } -/// POST `/webhook/config-pr` — Forgejo pull_request webhook for +/// POST `/webhook/config-pr` — Forgejo `pull_request` webhook for /// `agent-configs/*` repos. /// /// On `opened` or `synchronize` for an `agent-configs/` PR: diff --git a/hive-c0re/src/forge/mod.rs b/hive-c0re/src/forge/mod.rs index 92f1c4cb..112dc5d1 100644 --- a/hive-c0re/src/forge/mod.rs +++ b/hive-c0re/src/forge/mod.rs @@ -295,7 +295,7 @@ pub async fn ensure_all() { } } -/// Ensure a Forgejo pull_request org-webhook for `agent-configs` exists and +/// Ensure a Forgejo `pull_request` org-webhook for `agent-configs` exists and /// points at hive-c0re's `/webhook/config-pr` endpoint. Idempotent — lists /// existing hooks first and skips creation when one is already targeting the /// correct URL. `dashboard_port` is the TCP port hive-c0re's dashboard listens diff --git a/hive-c0re/src/server.rs b/hive-c0re/src/server.rs index ed7e589a..f98f9312 100644 --- a/hive-c0re/src/server.rs +++ b/hive-c0re/src/server.rs @@ -74,6 +74,7 @@ async fn handle(stream: UnixStream, coord: Arc) -> Result<()> { } } +#[allow(clippy::too_many_lines)] async fn dispatch(req: &HostRequest, coord: Arc) -> HostResponse { let result: anyhow::Result = async { Ok(match req {