From d1606fa2ac8391dda08949e587331eeb3e0ba3bc Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Sun, 9 Feb 2025 12:59:48 +0530 Subject: [PATCH] feat: setup forgeflux forge type in DB --- db/db-core/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/db/db-core/src/lib.rs b/db/db-core/src/lib.rs index 80cd93b..427ba12 100644 --- a/db/db-core/src/lib.rs +++ b/db/db-core/src/lib.rs @@ -309,6 +309,8 @@ impl Clone for Box { pub enum ForgeImplementation { /// [Gitea](https://gitea.io) softare forge Gitea, + /// [ForgeFlux](https://net.forgeflux.net) + ForgeFlux, } impl ForgeImplementation { @@ -316,6 +318,7 @@ impl ForgeImplementation { pub const fn to_str(&self) -> &'static str { match self { ForgeImplementation::Gitea => "gitea", + ForgeImplementation::ForgeFlux => "forgeflux", } } } @@ -326,9 +329,11 @@ impl FromStr for ForgeImplementation { /// Convert [str] to [ForgeImplementation] fn from_str(s: &str) -> DBResult { const GITEA: &str = ForgeImplementation::Gitea.to_str(); + const FORGEFLUX: &str = ForgeImplementation::ForgeFlux.to_str(); let s = s.trim(); match s { GITEA => Ok(Self::Gitea), + FORGEFLUX => Ok(Self::ForgeFlux), _ => Err(DBError::UnknownForgeType(s.to_owned())), } }