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

Function applyAuditRepoFlag

pkg/cli/audit.go:211–222  ·  view source on GitHub ↗
(repoFlag string, components *parser.GitHubURLComponents)

Source from the content-addressed store, hash-verified

209}
210
211func applyAuditRepoFlag(repoFlag string, components *parser.GitHubURLComponents) error {
212 if repoFlag == "" || components.Owner != "" {
213 return nil
214 }
215 parts := strings.SplitN(repoFlag, "/", 2)
216 if len(parts) != 2 || parts[0] == "" || parts[1] == "" {
217 return fmt.Errorf("invalid repository format '%s': expected 'owner/repo'", repoFlag)
218 }
219 components.Owner = parts[0]
220 components.Repo = parts[1]
221 return nil
222}
223
224// runAuditMulti handles the multi-run diff mode for the audit command.
225// The first argument is the base run; remaining arguments are comparison runs.

Callers 2

runAuditSingleFunction · 0.85
runAuditMultiFunction · 0.85

Calls 1

ErrorfMethod · 0.45

Tested by

no test coverage detected