Skip to content
Clone
a06673b
53 lines 1.7 KB Rust
//! pipeline usecase: in-memory pipeline stub (status cache only).
use gix::hash::ObjectId;
use crate::GitRepository;
use crate::pipeline::impls::PipelineOps;
use crate::pipeline::types::{CommitStatus, Job, StatusList, TriggerResult};
impl PipelineOps for GitRepository {
fn pipeline_trigger(
&self,
_commit: &ObjectId,
branch: &str,
) -> Result<TriggerResult, crate::Error> {
let _ = self.repo()?;
crate::validate::validate_short_name("branch", branch)?;
Err(crate::Error::Other(
"pipeline trigger is not supported by this backend".to_string(),
))
}
fn pipeline_schedule(&self, _commit: &ObjectId, _job: &Job) -> Result<(), crate::Error> {
let _ = self.repo()?;
Err(crate::Error::Other(
"pipeline scheduling is not supported by this backend".to_string(),
))
}
fn pipeline_set_commit_status(
&self,
_commit: &ObjectId,
_status: &CommitStatus,
) -> Result<(), crate::Error> {
let _ = self.repo()?;
Err(crate::Error::Other(
"pipeline commit status is not supported by this backend".to_string(),
))
}
fn pipeline_list_statuses(&self, _commit: &ObjectId) -> Result<StatusList, crate::Error> {
let _ = self.repo()?;
Err(crate::Error::Other(
"pipeline status listing is not supported by this backend".to_string(),
))
}
fn pipeline_cancel(&self, _job_id: &str) -> Result<(), crate::Error> {
let _ = self.repo()?;
Err(crate::Error::Other(
"pipeline cancel is not supported by this backend".to_string(),
))
}
}