pub struct IssueLikeHook {
pub kind: &'static str,
}Expand description
KindHook shared by issue and pull_request — both require
properties.number and properties.project_id, and, when present,
validate properties.state_reason. issue’s state_reason is governed
to a fixed set (ADR-088 §3); v0 does not document a fixed set for
pull_request’s state_reason, so it is only checked for non-emptiness
there.
GitHub issue/PR numbers are repository-scoped, not globally unique — two
different project entities in the same namespace can each have a #1.
properties.project_id is the natural-key scoping field the ingester’s
find_by_number lookup filters on, so it is required and validated as a
UUID here rather than left to the caller’s discipline.
Fields§
§kind: &'static strThe note kind this instance validates: "issue" or "pull_request".
Trait Implementations§
Source§impl Debug for IssueLikeHook
impl Debug for IssueLikeHook
Source§impl KindHook for IssueLikeHook
impl KindHook for IssueLikeHook
Source§fn prepare_create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_runtime: &'life1 KhiveRuntime,
args: &'life2 mut Value,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn prepare_create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_runtime: &'life1 KhiveRuntime,
args: &'life2 mut Value,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Mutate args before the storage write. Fill defaults, normalize values,
rearrange user-facing fields into the storage shape expected by the
shared CRUD handler. Read more
Source§fn after_create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_runtime: &'life1 KhiveRuntime,
_id: Uuid,
_args: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn after_create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_runtime: &'life1 KhiveRuntime,
_id: Uuid,
_args: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Fire side effects after a successful storage write — graph edges,
derived observations, etc. The newly created record’s UUID is passed
so the hook can attach metadata referencing it. Read more
Auto Trait Implementations§
impl Freeze for IssueLikeHook
impl RefUnwindSafe for IssueLikeHook
impl Send for IssueLikeHook
impl Sync for IssueLikeHook
impl Unpin for IssueLikeHook
impl UnsafeUnpin for IssueLikeHook
impl UnwindSafe for IssueLikeHook
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more