MCPcopy Create free account
hub / github.com/github/gh-aw / showUpdateSummary

Function showUpdateSummary

pkg/cli/update_display.go:11–31  ·  view source on GitHub ↗

showUpdateSummary displays a summary of workflow updates using console helpers

(successfulUpdates []string, failedUpdates []updateFailure)

Source from the content-addressed store, hash-verified

9
10// showUpdateSummary displays a summary of workflow updates using console helpers
11func showUpdateSummary(successfulUpdates []string, failedUpdates []updateFailure) {
12 fmt.Fprintln(os.Stderr, "")
13
14 // Show successful updates
15 if len(successfulUpdates) > 0 {
16 fmt.Fprintln(os.Stderr, console.FormatSuccessMessage(fmt.Sprintf("Successfully updated and compiled %d workflow(s):", len(successfulUpdates))))
17 for _, name := range successfulUpdates {
18 fmt.Fprintln(os.Stderr, console.FormatListItem(name))
19 }
20 fmt.Fprintln(os.Stderr, "")
21 }
22
23 // Show failed updates
24 if len(failedUpdates) > 0 {
25 fmt.Fprintln(os.Stderr, console.FormatErrorMessage(fmt.Sprintf("Failed to update %d workflow(s):", len(failedUpdates))))
26 for _, failure := range failedUpdates {
27 fmt.Fprintf(os.Stderr, " %s: %s\n", failure.Name, failure.Error)
28 }
29 fmt.Fprintln(os.Stderr, "")
30 }
31}

Callers 2

TestShowUpdateSummaryFunction · 0.85
UpdateWorkflowsFunction · 0.85

Calls 3

FormatSuccessMessageFunction · 0.92
FormatListItemFunction · 0.92
FormatErrorMessageFunction · 0.92

Tested by 1

TestShowUpdateSummaryFunction · 0.68