Add check for logJSON (#306)

Fixes #305
This commit is contained in:
Rhys Arkins 2017-06-15 20:57:18 +02:00 committed by GitHub
parent 5befcc58f4
commit 7e43fce47b

View file

@ -58,7 +58,9 @@ async function ensurePr(upgrades) {
upgrade.changeLogToVersion upgrade.changeLogToVersion
); );
// Store changelog markdown for backwards compatibility // Store changelog markdown for backwards compatibility
config.changelog = config.changelog || changelogHelper.getMarkdown(logJSON); if (logJSON) {
config.changelog =
config.changelog || changelogHelper.getMarkdown(logJSON);
upgrade.repositoryUrl = logJSON.project.repository; upgrade.repositoryUrl = logJSON.project.repository;
upgrade.githubName = logJSON.project.github; upgrade.githubName = logJSON.project.github;
upgrade.releases = []; upgrade.releases = [];
@ -85,6 +87,7 @@ async function ensurePr(upgrades) {
} }
upgrade.releases.push(release); upgrade.releases.push(release);
}); });
}
config.upgrades.push(upgrade); config.upgrades.push(upgrade);
} }