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

Function applyAuditMetrics

pkg/cli/audit.go:750–760  ·  view source on GitHub ↗
(run WorkflowRun, results auditAnalysisResults)

Source from the content-addressed store, hash-verified

748}
749
750func applyAuditMetrics(run WorkflowRun, results auditAnalysisResults) WorkflowRun {
751 run.TokenUsage = results.metrics.TokenUsage
752 run.Turns = results.metrics.Turns
753 run.ErrorCount = results.failedJobCount
754 if run.Conclusion == "failure" && run.ErrorCount == 0 {
755 run.ErrorCount = 1
756 }
757 run.WarningCount = 0
758 run.SafeItemsCount = results.safeItemsCount
759 return run
760}
761
762func buildProcessedAuditRun(run WorkflowRun, results auditAnalysisResults) ProcessedRun {
763 processedRun := ProcessedRun{

Calls

no outgoing calls