(repoFlag string, components *parser.GitHubURLComponents)
| 209 | } |
| 210 | |
| 211 | func 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. |
no test coverage detected