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

Function prepareAuditWorkflowRun

pkg/cli/audit.go:517–529  ·  view source on GitHub ↗
(ctx context.Context, cfg auditRunConfig)

Source from the content-addressed store, hash-verified

515}
516
517func prepareAuditWorkflowRun(ctx context.Context, cfg auditRunConfig) (WorkflowRun, error) {
518 run, hasLocalCache, useLocalCache, err := fetchAuditRunWithCache(ctx, cfg)
519 if err != nil {
520 return WorkflowRun{}, err
521 }
522 if !useLocalCache {
523 useLocalCache, err = downloadAuditArtifactsIfNeeded(ctx, cfg, run, hasLocalCache)
524 if err != nil {
525 return WorkflowRun{}, err
526 }
527 }
528 return prepareRunForAnalysis(run, cfg, useLocalCache), nil
529}
530
531func fetchAuditRunWithCache(ctx context.Context, cfg auditRunConfig) (WorkflowRun, bool, bool, error) {
532 hasLocalCache := fileutil.DirExists(cfg.outputDir) && !fileutil.IsDirEmpty(cfg.outputDir)

Callers 1

AuditWorkflowRunFunction · 0.85

Calls 3

fetchAuditRunWithCacheFunction · 0.85
prepareRunForAnalysisFunction · 0.85

Tested by

no test coverage detected