(input: HookInput)
| 258 | } |
| 259 | |
| 260 | function getMatcherValue(input: HookInput): string | undefined { |
| 261 | const eventName = input.hook_event_name as HookEventName; |
| 262 | |
| 263 | if (NO_MATCHER_EVENTS.includes(eventName)) { |
| 264 | return undefined; |
| 265 | } |
| 266 | |
| 267 | const field = MATCHER_FIELD_MAP[eventName]; |
| 268 | if (!field) return undefined; |
| 269 | |
| 270 | return (input as any)[field] as string | undefined; |
| 271 | } |
| 272 | |
| 273 | export async function runHooks( |
| 274 | config: HooksConfig, |