(runs []HookRunRecord)
| 368 | } |
| 369 | |
| 370 | func 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 | |
| 407 | func hookMatcherRows(matcher hookspkg.HookMatcher) [][]string { |
| 408 | rows := make([][]string, 0, 16) |
no test coverage detected