(ctx *snap.Context, owner, repo string)
| 3238 | } |
| 3239 | |
| 3240 | func createPrivateRepository(ctx *snap.Context, owner, repo string) error { |
| 3241 | repoFull := fmt.Sprintf("%s/%s", owner, repo) |
| 3242 | |
| 3243 | cmd := exec.Command("gh", "repo", "create", repoFull, "--private", "--confirm") |
| 3244 | cmd.Stdout = ctx.Stdout() |
| 3245 | cmd.Stderr = ctx.Stderr() |
| 3246 | cmd.Stdin = ctx.Stdin() |
| 3247 | if err := cmd.Run(); err != nil { |
| 3248 | return fmt.Errorf("gh repo create %s: %w", repoFull, err) |
| 3249 | } |
| 3250 | return nil |
| 3251 | } |
| 3252 | |
| 3253 | func runCreateRepoFromRemote(ctx *snap.Context) error { |
| 3254 | if err := ensureGitRepository(); err != nil { |
no outgoing calls
no test coverage detected