Single-commit clean baseline after security scrub of niche-tells, project codenames, internal jargon, and contributor-email leaks. Contents: - 100 Rust crates (_primitives/_rust/) - 37 agent manifests (_manifests/) + generated specs (_generated/) - 67 user-invocable skills (skills/) - 33 hooks (hooks/) - Composition blocks (_blocks/) - Documentation (docs/, README.md) - TS adapter packages (_ts_packages/) - Assembler (_assembler/) - Roles (_roles/) - Templates (_templates/) - Forgejo CI (.forgejo/) Author: Denis Parfionovich <info@greendragon.info> License: see LICENSE.
31 lines
1.2 KiB
Rust
31 lines
1.2 KiB
Rust
//! ForgejoStore — thin alias of GitHubStore with a different display name.
|
|
//!
|
|
//! Forgejo is a hard fork of Gitea — git wire protocol identical. Only the
|
|
//! base URL and token env var differ; those are resolved from config.
|
|
|
|
use crate::config::GitRemoteCfg;
|
|
use crate::github::GitHubStore;
|
|
use anyhow::Result;
|
|
use std::path::PathBuf;
|
|
|
|
pub struct ForgejoStore {
|
|
inner: GitHubStore,
|
|
}
|
|
|
|
impl ForgejoStore {
|
|
pub fn new(local: PathBuf, remote: GitRemoteCfg) -> Result<Self> {
|
|
let inner = GitHubStore::with_name(local, remote, "forgejo")?;
|
|
Ok(Self { inner })
|
|
}
|
|
}
|
|
|
|
impl crate::store_trait::MemoryStore for ForgejoStore {
|
|
fn read(&self, path: &str) -> Result<Vec<u8>> { self.inner.read(path) }
|
|
fn write(&self, path: &str, bytes: &[u8]) -> Result<()> { self.inner.write(path, bytes) }
|
|
fn list(&self, dir: &str) -> Result<Vec<String>> { self.inner.list(dir) }
|
|
fn branch(&self, name: &str) -> Result<()> { self.inner.branch(name) }
|
|
fn commit(&self, message: &str) -> Result<String> { self.inner.commit(message) }
|
|
fn push(&self, branch: &str) -> Result<()> { self.inner.push(branch) }
|
|
fn pull(&self, branch: &str) -> Result<()> { self.inner.pull(branch) }
|
|
fn backend_name(&self) -> &'static str { "forgejo" }
|
|
}
|