Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (git && !gitTemplate) {
if (gitParsed) {
gitTemplate = gitParsed.template;
gitBranch = gitBranch || gitParsed.branch;
} else {
file.message(`Missing url to compare releases.`);
}
}
if (!gitBranch) {
// default to
gitBranch = 'HEAD';
}
await addRelease(file, {
version,
yanked,
gitTemplate,
gitBranch,
allowYanked,
allowPrerelease,
mergePrerelease
});
await write({ file, stdout });
if (git && ghrelease) {
if (!gitParsed) {
file.message(`Cannot create a Github Release without the git url.`);
}
await createGithubRelease({ file, version, success, info, warn, error, gitParsed });