|
|
@ -1,6 +1,7 @@ |
|
|
|
package cmd |
|
|
|
package cmd |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
|
|
|
|
"os" |
|
|
|
"context" |
|
|
|
"context" |
|
|
|
"fmt" |
|
|
|
"fmt" |
|
|
|
"strings" |
|
|
|
"strings" |
|
|
@ -54,6 +55,12 @@ func runMigrate(ctx *cli.Context) error { |
|
|
|
|
|
|
|
|
|
|
|
username := strings.Split(ctx.String("gh-repo"), "/")[0] |
|
|
|
username := strings.Split(ctx.String("gh-repo"), "/")[0] |
|
|
|
repo := strings.Split(ctx.String("gh-repo"), "/")[1] |
|
|
|
repo := strings.Split(ctx.String("gh-repo"), "/")[1] |
|
|
|
|
|
|
|
if u := os.Getenv("GITHUB_USER"); u != "" { |
|
|
|
|
|
|
|
m.AuthUsername = u |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if p := os.Getenv("GITHUB_PASS"); p != "" { |
|
|
|
|
|
|
|
m.AuthPassword = p |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return migrate(c, gc, m, username, repo, ctx.Bool("only-repo")) |
|
|
|
return migrate(c, gc, m, username, repo, ctx.Bool("only-repo")) |
|
|
|
} |
|
|
|
} |
|
|
|