From 5b5de13db04fcb2a02e57133497b4293b1b5563e Mon Sep 17 00:00:00 2001 From: pep Date: Tue, 11 Mar 2025 12:31:39 +0100 Subject: [PATCH] Allow deprecated elements from gitlab crate We know they exist. There's no obvious replacement for the moment, so they'll just stop working when they stop working. Signed-off-by: pep --- src/hooks/gitlab.rs | 2 ++ src/hooks/mod.rs | 1 + src/web.rs | 5 ++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hooks/gitlab.rs b/src/hooks/gitlab.rs index 0cea8d6..d225ff0 100644 --- a/src/hooks/gitlab.rs +++ b/src/hooks/gitlab.rs @@ -13,6 +13,8 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +#![allow(deprecated)] + use crate::hooks::types::{ Commit, Hook, Issue, IssueAction, IssueAttrs, MergeRequest, MergeRequestAction, MergeRequestAttrs, Note, Push, Repository, User, Wiki, WikiAction, diff --git a/src/hooks/mod.rs b/src/hooks/mod.rs index f250052..8532138 100644 --- a/src/hooks/mod.rs +++ b/src/hooks/mod.rs @@ -18,6 +18,7 @@ mod gitlab; mod types; pub use crate::hooks::forgejo::ForgejoHook; +#[allow(deprecated)] pub use crate::hooks::gitlab::GitlabHook; pub use crate::hooks::types::Hook; use crate::hooks::types::{IssueAction, MergeRequestAction, WikiAction}; diff --git a/src/web.rs b/src/web.rs index be34a0a..dade14e 100644 --- a/src/web.rs +++ b/src/web.rs @@ -14,7 +14,9 @@ // along with this program. If not, see . use crate::error::Error; -use crate::hooks::{ForgejoHook, GitlabHook, Hook}; +#[allow(deprecated)] +use crate::hooks::GitlabHook; +use crate::hooks::{ForgejoHook, Hook}; use std::convert::Infallible; use std::io::Read; @@ -66,6 +68,7 @@ async fn hooks_inner(req: Request, secret: &str) -> Result