renderViewSafeOutputs reads safe-output-items.jsonl from runDir and prints a human-friendly summary of every item that was created during the run. A missing or empty manifest is silently ignored.
(runDir string)
| 197 | // human-friendly summary of every item that was created during the run. |
| 198 | // A missing or empty manifest is silently ignored. |
| 199 | func renderViewSafeOutputs(runDir string) { |
| 200 | items := extractCreatedItemsFromManifest(runDir) |
| 201 | if len(items) == 0 { |
| 202 | return |
| 203 | } |
| 204 | |
| 205 | fmt.Fprintln(os.Stdout) |
| 206 | fmt.Fprintln(os.Stdout, console.FormatSectionHeader("Safe Outputs")) |
| 207 | for _, item := range items { |
| 208 | line := " " + item.Type |
| 209 | if item.URL != "" { |
| 210 | line += " " + item.URL |
| 211 | } else if item.Repo != "" && item.Number > 0 { |
| 212 | line += fmt.Sprintf(" %s#%d", item.Repo, item.Number) |
| 213 | } |
| 214 | fmt.Fprintln(os.Stdout, line) |
| 215 | } |
| 216 | } |
no test coverage detected