Skip to content

Commit 186af65

Browse files
authored
Merge pull request #116 from mdbenito/feature/import-api
New feature: Option to use issue import preview API
2 parents ed6afeb + 82abb4a commit 186af65

6 files changed

Lines changed: 305 additions & 28 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ Under which organisation or user will the new project be hosted
7474

7575
Go to [Settings / Developer settings / Personal access tokens](https://github.com/settings/tokens). Generate a new token with `repo` scope and copy that into the `settings.ts`
7676

77+
#### github.token_owner
78+
79+
Set to the user name of the user whose token is used (see above). This is required to determine whether the user running the migration is also the creator of comments and issues. If this is the case and `useIssueCreationAPI` is true (see below), the extra line specifying who created a comment or issue will not be added.
80+
7781
#### github.repo
7882

7983
What is the name of the new repo
@@ -112,6 +116,10 @@ If this is set to true (default) then the migration process will transfer merge
112116

113117
As default it is set to false. Doesn't fire the requests to github api and only does the work on the gitlab side to test for wonky cases before using up api-calls
114118

119+
#### useIssueImportAPI
120+
121+
Set to true (default) to enable using the [GitHub preview API for importing issues](https://gist.github.com/jonmagic/5282384165e0f86ef105). This allows setting the date for issues and comments instead of inserting an additional line in the body.
122+
115123
#### usePlaceholderIssuesForMissingIssues
116124

117125
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.

sample_settings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export default {
1111
// baseUrl: 'https://gitlab.mycompany.com:123/etc',
1212
owner: '{{repository owner (user or organization)}}',
1313
token: '{{token}}',
14+
token_owner: '{{token_owner}}',
1415
repo: '{{repo}}',
1516
},
1617
s3: {
@@ -36,6 +37,7 @@ export default {
3637
mergeRequests: true,
3738
},
3839
debug: false,
40+
useIssueImportAPI: true,
3941
usePlaceholderIssuesForMissingIssues: true,
4042
useReplacementIssuesForCreationFails: true,
4143
useIssuesForAllMergeRequests: false,

0 commit comments

Comments
 (0)