MCPcopy Create free account
hub / github.com/compozy/agh / hookRunsBundle

Function hookRunsBundle

internal/cli/hooks.go:370–405  ·  view source on GitHub ↗
(runs []HookRunRecord)

Source from the content-addressed store, hash-verified

368}
369
370func hookRunsBundle(runs []HookRunRecord) outputBundle {
371 return listBundle(
372 runs,
373 runs,
374 "Hook Runs",
375 []string{"Hook", hooksEventValue, "Outcome", cliDurationValue, hooksErrorValue},
376 "runs",
377 []string{
378 "hook_name",
379 hooksEventKey,
380 cliOutcomeKey,
381 cliDurationMSKey,
382 hooksErrorKey,
383 "recorded_at",
384 },
385 func(item HookRunRecord) []string {
386 return []string{
387 stringOrDash(item.HookName),
388 stringOrDash(item.Event),
389 stringOrDash(item.Outcome),
390 stringOrDash(formatHookDuration(item.DurationMS)),
391 stringOrDash(item.Error),
392 }
393 },
394 func(item HookRunRecord) []string {
395 return []string{
396 item.HookName,
397 item.Event,
398 item.Outcome,
399 strconv.FormatInt(item.DurationMS, 10),
400 item.Error,
401 formatTime(item.RecordedAt),
402 }
403 },
404 )
405}
406
407func hookMatcherRows(matcher hookspkg.HookMatcher) [][]string {
408 rows := make([][]string, 0, 16)

Callers 1

newHooksRunsCommandFunction · 0.85

Calls 4

listBundleFunction · 0.85
stringOrDashFunction · 0.85
formatHookDurationFunction · 0.85
formatTimeFunction · 0.85

Tested by

no test coverage detected