Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github-release-notes

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-release-notes - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

4

package.json
{
"name": "github-release-notes",
"version": "0.3.2",
"version": "0.3.3",
"description": "Node module to publish release notes based on commits between the last two tags.",

@@ -30,2 +30,2 @@ "main": "./github-release-notes.js",

}
}
}

@@ -20,3 +20,3 @@ 'use strict';

function makeRelease(gren, releaseOptions) {
return new Promise(function (resolve, reject) {
return new Promise(function (resolve, reject) {
gren.repo.makeRelease(releaseOptions, function (err, release) {

@@ -69,3 +69,3 @@ if(err) {

*/
function prepareRelease(gren, tags, commitMessages) {
function prepareRelease(gren, tagName, commitMessages) {
var body = commitMessages

@@ -80,4 +80,4 @@ .slice(0, -1)

var releaseOptions = {
tag_name: tags[0].name,
name: (gren.options.prefix || '') + tags[0].name,
tag_name: tagName,
name: (gren.options.prefix || '') + tagName,
body: body,

@@ -153,3 +153,3 @@ draft: gren.options.draft || false,

var filteredTags = tags.filter(function(tag, index) {
return index === 0 || tag.name === releaseTagName;
return index === 0 || (releaseTagName ? tag.name === releaseTagName : index === tags.length-1 );
});

@@ -173,6 +173,10 @@

gren.repo.getLatestRelease(function (err, release) {
if(err) {
if(err && err.request.status !== 404) {
reject(err);
} else {
resolve(release.tag_name);
if(err && err.request.status === 404) {
resolve(false);
} else {
resolve(release.tag_name);
}
}

@@ -224,2 +228,3 @@ });

var that = this;
var tagName;

@@ -235,2 +240,4 @@ return getLatestRelease(this)

tagName = tags[0].name;
return Promise.all(getTagDates(that, tags[0], tags[1]));

@@ -242,3 +249,3 @@ })

.then(function (commitMessages) {
return prepareRelease(that, tags, commitMessages);
return prepareRelease(that, tagName, commitMessages);
})

@@ -245,0 +252,0 @@ .then(function (success) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc