a34fe57
zhenyi
feat(lib): add new handlers and export views (db users_loader, repo readme/lifecycle/tree/PR/release, issue reopen, export sidebar/basic)
a34fe57
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;
}