Skip to content

Commit c2925d8

Browse files
committed
fix(releases): add to readme and sample settings, fix whitespace
1 parent aa080df commit c2925d8

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ If this is set to true (default) then the migration process will transfer issues
104104

105105
If this is set to true (default) then the migration process will transfer merge requests.
106106

107+
#### transfer.releases
108+
109+
If this is set to true (default) then the migration process will transfer releases.
110+
Note that github api for releases is limited and hence this will only transfer the title and description of the releases
111+
and add them to github in chronological order, but it would not preserve the original release dates, nor transfer artefacts or assets.
112+
107113
#### debug
108114

109115
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

sample_settings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default {
3333
labels: true,
3434
issues: true,
3535
mergeRequests: true,
36+
releases: true,
3637
},
3738
debug: false,
3839
usePlaceholderIssuesForMissingIssues: true,

src/index.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ async function migrate() {
156156
await transferMergeRequests();
157157
}
158158
}
159-
160-
161159
} catch (err) {
162160
console.error('Error during transfer:');
163161
console.error(err);
@@ -484,8 +482,8 @@ async function transferMergeRequests() {
484482

485483
// if a GitLab release does not exist in GitHub repo, create it
486484
for (let release of releases) {
487-
// Try to find a GitHub pull request that already exists for this GitLab
488-
// merge request
485+
// Try to find an existing github release that already exists for this GitLab
486+
// release
489487
let githubRelease = await githubHelper.getReleaseByTag(release.tag_name);
490488

491489
if (!githubRelease) {
@@ -503,12 +501,10 @@ async function transferMergeRequests() {
503501
console.error(err);
504502
}
505503
} else {
506-
if (githubRelease) {
507504
console.log(
508505
'Gitlab release already exists (as github release): ' +
509506
githubRelease.data.name + ' - ' + githubRelease.data.tag_name
510507
);
511-
}
512508
}
513509
}
514510
}

0 commit comments

Comments
 (0)