Skip to content

Commit

Permalink
Prettier release notes if no highlighted changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rtsao committed Oct 26, 2017
1 parent 429623b commit 105f6e0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions generate-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,21 @@ module.exports = function generateChangelog(changes, labelWeight) {
}

if (nonweighted.length) {
lines.push('');
lines.push('### Other Changes');
if (weighted.length) {
lines.push('');
lines.push('### Other Changes');
}
for (let [, value] of nonweighted) {
for (let change of value.changes) {
lines.push(changeItem(change, false));
}
}
}

if (!nonweighted.length && !weighted.length) {
lines.push('No pull requests in this release');
}

return lines.join('\n');
};

Expand Down

0 comments on commit 105f6e0

Please sign in to comment.