Skip to content

Commit b28ceec

Browse files
authored
Merge pull request piceaTech#168 from ViliusS/fix-null-description
Transfer description only when it exist
2 parents 0acba01 + cd350ff commit b28ceec

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)