github-release-notes
Advanced tools
Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "github-release-notes", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Node module to publish release notes based on commits between the last two tags.", | ||
@@ -5,0 +5,0 @@ "main": "./github-release-notes.js", |
@@ -20,12 +20,16 @@ 'use strict'; | ||
function makeRelease(gren, releaseOptions) { | ||
gren.repo.makeRelease(releaseOptions, function (err, release) { | ||
if(err) { | ||
var responseText = JSON.parse(err.request.responseText); | ||
console.error( | ||
responseText.message + '\n' | ||
+ responseText.errors[0].code | ||
); | ||
} else { | ||
console.info(release.tag_name + ' successfully created!'); | ||
} | ||
return new Promise(function (resolve, reject) { | ||
gren.repo.makeRelease(releaseOptions, function (err, release) { | ||
if(err) { | ||
var responseText = JSON.parse(err.request.responseText); | ||
console.error( | ||
responseText.message + '\n' | ||
+ responseText.errors[0].code | ||
); | ||
reject(false); | ||
} else { | ||
console.log(release.tag_name + ' successfully created!'); | ||
resolve(true); | ||
} | ||
}); | ||
}); | ||
@@ -82,3 +86,3 @@ } | ||
makeRelease(gren, releaseOptions); | ||
return makeRelease(gren, releaseOptions); | ||
} | ||
@@ -217,3 +221,3 @@ | ||
getLatestRelease(this) | ||
return getLatestRelease(this) | ||
.then(function (releaseTagName) { | ||
@@ -233,4 +237,7 @@ return getLastTags(that, releaseTagName); | ||
.then(function (commitMessages) { | ||
prepareRelease(that, tags, commitMessages); | ||
return prepareRelease(that, tags, commitMessages); | ||
}) | ||
.then(function (success) { | ||
return success; | ||
}) | ||
.catch(function (error) { | ||
@@ -237,0 +244,0 @@ console.error(error); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8228
222