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

Function runAuditSingle

pkg/cli/audit.go:187–209  ·  view source on GitHub ↗
(ctx context.Context, runIDOrURL string, opts auditCommandOptions)

Source from the content-addressed store, hash-verified

185}
186
187func runAuditSingle(ctx context.Context, runIDOrURL string, opts auditCommandOptions) error {
188 components, err := parser.ParseRunURLExtended(runIDOrURL)
189 if err != nil {
190 return err
191 }
192 if err := applyAuditRepoFlag(opts.repoFlag, components); err != nil {
193 return err
194 }
195 return AuditWorkflowRun(ctx, components.Number, AuditOptions{
196 Owner: components.Owner,
197 Repo: components.Repo,
198 Hostname: components.Host,
199 OutputDir: opts.outputDir,
200 Verbose: opts.verbose,
201 Parse: opts.parse,
202 JSONOutput: opts.jsonOutput,
203 JobID: components.JobID,
204 StepNumber: components.StepNumber,
205 ArtifactSets: opts.artifacts,
206 ExperimentFilter: opts.experimentFilter,
207 VariantFilter: opts.variantFilter,
208 })
209}
210
211func applyAuditRepoFlag(repoFlag string, components *parser.GitHubURLComponents) error {
212 if repoFlag == "" || components.Owner != "" {

Callers 1

runAuditCommandFunction · 0.85

Calls 3

ParseRunURLExtendedFunction · 0.92
applyAuditRepoFlagFunction · 0.85
AuditWorkflowRunFunction · 0.85

Tested by

no test coverage detected