You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ Written in Go, this is a cross-platform CLI utility that accepts the following r
38
38
-github-repo string
39
39
the GitHub repository to migrate to
40
40
-github-user string
41
-
specifies the GitHub user to use, who will author any migrated PRs. can also be sourced from GITHUB_USER environment variable (required)
41
+
specifies the GitHub user to use, who will author any migrated PRs (required)
42
42
-gitlab-domain string
43
43
specifies the GitLab domain to use (default "gitlab.com")
44
44
-gitlab-project string
@@ -52,8 +52,11 @@ Written in Go, this is a cross-platform CLI utility that accepts the following r
52
52
-projects-csv string
53
53
specifies the path to a CSV file describing projects to migrate (incompatible with -gitlab-project and -github-repo)
54
54
-rename-master-to-main
55
-
rename master branch to main and update pull requests
56
-
```
55
+
rename master branch to main and update pull requests (incompatible with -rename-trunk-branch)
56
+
-rename-trunk-branch string
57
+
specifies the new trunk branch name (incompatible with -rename-master-to-main)
58
+
-report
59
+
report on primitives to be migrated instead of beginning migration```
57
60
58
61
Use the `-github-user` argument to specify the GitHub username for whom the authentication token was issued (mandatory). You can also specify this with the `GITHUB_USER` environment variable.
59
62
@@ -75,7 +78,7 @@ Note: If the destination repository does not exist, this tool will attempt to cr
75
78
76
79
Specify the location of a self-hosted instance of GitLab with the `-gitlab-domain` argument, or a GitHub Enterprise instance with the `-github-domain` argument.
77
80
78
-
As a bonus, this tool can transparently rename the `master` branch on your GitLab repository, to `main` on the migrated GitHub repository - enable with the `-rename-master-to-main` argument.
81
+
As a bonus, this tool can transparently rename the trunk branch on your GitHub repository - enable with the `-rename-trunk-branch` argument. This will also work for any open merge requests as they are translated to pull requests.
79
82
80
83
By default, 4 workers will be spawned to migrate up to 4 projects in parallel. You can increase or decrease this with the `-max-concurrency` argument. Note that due to GitHub API rate-limiting, you may not experience any significant speed-up. See [GitHub API docs](https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api) for details.
flag.BoolVar(&deleteExistingRepos, "delete-existing-repos", false, "whether existing repositories should be deleted before migrating")
152
152
flag.BoolVar(&enablePullRequests, "migrate-pull-requests", false, "whether pull requests should be migrated")
153
-
flag.BoolVar(&renameMasterToMain, "rename-master-to-main", false, "rename master branch to main and update pull requests")
153
+
flag.BoolVar(&renameMasterToMain, "rename-master-to-main", false, "rename master branch to main and update pull requests (incompatible with -rename-trunk-branch)")
154
154
155
155
flag.StringVar(&githubDomain, "github-domain", defaultGithubDomain, "specifies the GitHub domain to use")
156
156
flag.StringVar(&githubRepo, "github-repo", "", "the GitHub repository to migrate to")
157
157
flag.StringVar(&githubUser, "github-user", "", "specifies the GitHub user to use, who will author any migrated PRs (required)")
158
158
flag.StringVar(&gitlabDomain, "gitlab-domain", defaultGitlabDomain, "specifies the GitLab domain to use")
159
159
flag.StringVar(&gitlabProject, "gitlab-project", "", "the GitLab project to migrate")
160
160
flag.StringVar(&projectsCsvPath, "projects-csv", "", "specifies the path to a CSV file describing projects to migrate (incompatible with -gitlab-project and -github-repo)")
161
+
flag.StringVar(&renameTrunkBranch, "rename-trunk-branch", "", "specifies the new trunk branch name (incompatible with -rename-master-to-main)")
161
162
162
163
flag.IntVar(&maxConcurrency, "max-concurrency", 4, "how many projects to migrate in parallel")
163
164
@@ -182,6 +183,11 @@ func main() {
182
183
os.Exit(1)
183
184
}
184
185
186
+
ifrenameMasterToMain&&renameTrunkBranch!="" {
187
+
logger.Error("cannot specify -rename-master-to-main and -rename-trunk-branch together")
0 commit comments