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
+14-8Lines changed: 14 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ After doing this, the autolinking of issues, commits, and branches will work. Se
34
34
35
35
## Usage
36
36
37
-
The user must be a member of the project you want to copy or else you won't see it in the first step.
37
+
The user must be a member of the project you want to copy. This user must be the one
38
38
39
39
1.`cp sample_settings.ts settings.ts`
40
40
1. edit settings.ts
@@ -114,11 +114,15 @@ As default it is set to false. Doesn't fire the requests to github api and only
114
114
115
115
#### usePlaceholderIssuesForMissingIssues
116
116
117
-
If this is set to true (default) then the migration process will automatically create empty dummy issues for every 'missing' GitLab issue (if you deleted an GitLab issue for example). Those issues will be closed on Github and they ensure, that the issue ids stay the same on both, GitLab and Github.
117
+
If this is set to true (default) then the migration process will automatically create empty dummy issues for every 'missing' GitLab issue (if you deleted a GitLab issue for example). Those issues will be closed on Github and they ensure that the issue ids stay the same on both GitLab and Github.
118
+
119
+
#### usePlaceholderMilestonesForMissingMilestones
120
+
121
+
If this is set to true (default) then the migration process will automatically create empty dummy milestones for every 'missing' GitLab milestone (if you deleted a GitLab milestone for example). Those milestones will be closed on Github and they ensure that the milestone ids stay the same on both GitLab and Github.
118
122
119
123
#### useReplacementIssuesForCreationFails
120
124
121
-
If this is set to true (default) then the migration process will automatically create so called "replacement-issues" for every issue where the migration fails. This replacement issue will be exactly the same, but the original description will be lost. In the future, the description of the replacement issue will also contain a link to the original issue on GitLab. This way users, who still have access to the GitLab repository can still view its content. However, this is still an open task. (TODO)
125
+
If this is set to true (default) then the migration process will automatically create so called "replacement-issues" for every issue where the migration fails. This replacement issue will be exactly the same, but the original description will be lost. In the future, the description of the replacement issue will also contain a link to the original issue on GitLab. This way, users who still have access to the GitLab repository can still view its content. However, this is still an open task. (TODO)
122
126
123
127
It would of course be better to find the cause for migration fails, so that no replacement issues would be needed. Finding the cause together with a retry-mechanism would be optimal, and will maybe come in the future - currently the replacement-issue-mechanism helps to keep things in order.
124
128
@@ -150,11 +154,11 @@ Maps the usernames from gitlab to github. If the assinee of the gitlab issue is
150
154
151
155
### projectmap
152
156
153
-
When one renames the project while transfering so that the projects don't loose there links to the mentioned issues.
157
+
This is useful when migrating multiple projects if they are renamed at destination. Provide a map from gitlab names to github names so that any cross-project references (e.g. issues) are not lost.
154
158
155
159
## Import limit
156
160
157
-
Because Github has a limit of 5000 Api requests per hour one has to watch out that one doesn't get over this limit. I transferred one of my project with it ~ 300 issues with ~ 200 notes. This totals to some 500 objects excluding commits which are imported through githubs importer. I never got under 3800 remaining requests (while testing it two times in one hour).
161
+
Because Github has a limit of 5000 Api requests per hour one has to be careful not to go over this limit. I transferred one of my project with it ~ 300 issues with ~ 200 notes. This totals to some 500 objects excluding commits which are imported through githubs importer. I never got under 3800 remaining requests (while testing it two times in one hour).
158
162
159
163
So the rule of thumb should be that one can import a repo with ~ 2500 issues without a problem.
160
164
@@ -165,7 +169,9 @@ So the rule of thumb should be that one can import a repo with ~ 2500 issues wit
165
169
See section 'useReplacementIssuesForCreationFails' above for more infos!
166
170
One reason seems to be some error with `Octokit` (error message snippet: https://pastebin.com/3VNUNYLh)
167
171
168
-
### Milestone refs and issue refs
172
+
### Milestone, MR and issue references
173
+
174
+
This is WIP
169
175
170
176
the milestone refs and issue refs do not seem to be rewritten properly at the
171
177
moment. specifically, milestones show up like `%4` in comments
@@ -182,6 +188,6 @@ A throttling mechanism could maybe help to avoid api rate limit errors.
182
188
In some scenarios the ability to migrate is probably more important than the total
183
189
duration of the migration process. Some users may even be willing to accept a very long duration (> 1 day if necessary?), if they can get the migration done at all, in return.
184
190
185
-
### Make request run in parallel
191
+
### Make requests run in parallel
186
192
187
-
Some requests could be run in parallel, to shorten the total duration. Currently all GitLab- and Github-Api-Requests are being run sequentially.
193
+
Some requests could be run in parallel, to shorten the total duration. Currently all GitLab- and Github-Api-Requests are run sequentially.
@@ -574,13 +590,13 @@ export default class GithubHelper {
574
590
awaitthis.githubApi.pulls.create(props);
575
591
returnPromise.resolve({data: null});// need to return null promise for parent to wait on
576
592
}catch(err){
577
-
if(err.status===422){
593
+
if(err.status===422){
578
594
console.error(
579
595
`Pull request #${pullRequest.iid} - attempt to create has failed, assume '${pullRequest.source_branch}' has already been merged => cannot migrate pull request, creating an issue instead.`
580
596
);
581
597
// fall through to next section
582
598
}else{
583
-
throw(err);
599
+
throwerr;
584
600
}
585
601
}
586
602
}
@@ -651,8 +667,9 @@ export default class GithubHelper {
0 commit comments