d977f67
zhenyi
refactor(dvcs): refresh dvcs/git, dvcs/gitsmart, dvcs/gitssh, dvcs/gitsync, dvcs/gitauth
d977f67
use crate::hook::types::{HookEvent, HookEventKind, HookResult, ScriptOutput};
pub trait HookOps {
fn hook_pre_receive(&self, event: &HookEvent) -> Result<HookResult, crate::Error>;
fn hook_post_receive(&self, event: &HookEvent) -> Result<HookResult, crate::Error>;
fn hook_emit(&self, event: &HookEvent) -> Result<(), crate::Error>;
fn hook_execute_script(
&self,
script: &str,
args: &[&str],
) -> Result<ScriptOutput, crate::Error>;
fn hook_supported(&self, kind: HookEventKind) -> bool;
}