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

Function prepareRunForAnalysis

pkg/cli/audit.go:584–599  ·  view source on GitHub ↗
(run WorkflowRun, cfg auditRunConfig, useLocalCache bool)

Source from the content-addressed store, hash-verified

582}
583
584func prepareRunForAnalysis(run WorkflowRun, cfg auditRunConfig, useLocalCache bool) WorkflowRun {
585 if useLocalCache && run.DatabaseID == 0 {
586 run = WorkflowRun{
587 DatabaseID: cfg.runID,
588 WorkflowName: fmt.Sprintf("Workflow Run %d", cfg.runID),
589 Status: "unknown",
590 LogsPath: cfg.outputDir,
591 }
592 fmt.Fprintln(os.Stderr, console.FormatInfoMessage("Using locally cached artifacts without metadata. Some report details may be unavailable."))
593 }
594 run.LogsPath = cfg.outputDir
595 if !run.StartedAt.IsZero() && !run.UpdatedAt.IsZero() {
596 run.Duration = run.UpdatedAt.Sub(run.StartedAt)
597 }
598 return run
599}
600
601func collectAuditAnalysisResults(run WorkflowRun, runOutputDir string, verbose bool, hasFirewallArtifact bool) auditAnalysisResults {
602 results := auditAnalysisResults{}

Callers 1

prepareAuditWorkflowRunFunction · 0.85

Calls 1

FormatInfoMessageFunction · 0.92

Tested by

no test coverage detected