Skip to content

Commit cd350ff

Browse files
committed
Transfer description only when it exist
This fixes JavaScript errors with newer GitLab repositories where description is null.
1 parent 7e056e2 commit cd350ff

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,12 @@ async function transferDescription() {
237237

238238
let project = await gitlabApi.Projects.show(settings.gitlab.projectId);
239239

240-
await githubHelper.updateRepositoryDescription(project.description);
240+
if (project.description) {
241+
await githubHelper.updateRepositoryDescription(project.description);
242+
console.log('Done.');
243+
} else {
244+
console.log('Description is empty, nothing to transfer.')
245+
}
241246
}
242247

243248
// ----------------------------------------------------------------------------

0 commit comments

Comments
 (0)