feat(notforge): add Gitea API foundation

This commit is contained in:
2026-07-11 23:33:24 -04:00
parent 3a475bc25b
commit 1a3aaf2dd9
12 changed files with 1433 additions and 3 deletions

View File

@@ -0,0 +1,36 @@
use miette::Diagnostic;
use thiserror::Error;
/// Error type for forge lifecycle, API, git, and secret-resolution failures.
#[derive(Debug, Diagnostic, Error)]
pub enum NotforgeError {
/// Configuration could not be loaded or parsed.
#[error("configuration error: {0}")]
#[diagnostic(code(notforge::config))]
Config(String),
/// A required secret could not be resolved.
#[error("secret resolution error: {0}")]
#[diagnostic(code(notforge::secret))]
Secret(String),
/// Forge API communication failed.
#[error("HTTP error: {0}")]
#[diagnostic(code(notforge::http))]
Http(String),
/// A lifecycle command failed.
#[error("command error: {0}")]
#[diagnostic(code(notforge::command))]
Command(String),
/// A git operation failed.
#[error("git error: {0}")]
#[diagnostic(code(notforge::git))]
Git(String),
/// Repository lookup or provisioning failed.
#[error("repository error: {0}")]
#[diagnostic(code(notforge::repository))]
Repository(String),
}