Added casper changelog option to release draft

no issue

- Added option to allow appending casper changelog to main release draft
- Uses capser changelog path and new version info to append casper changes
This commit is contained in:
Rish 2019-03-17 13:16:07 +05:30
parent dba3b43708
commit d0bde8c9bc

View File

@ -49,6 +49,15 @@ module.exports.create = (options = {}) => {
body = body.concat(changelog);
// @NOTE: Add casper changelog if present
if (options.hasOwnProperty('casper') && _.isObject(options.casper) && options.casper.changelogPath) {
let casperChangelog = fs.readFileSync(options.casper.changelogPath).toString('utf8').split(os.EOL);
casperChangelog = localUtils.filterEmojiCommits(casperChangelog);
body.push('');
body.push(`Casper (the default theme) has been upgraded to ${options.casper.version}:`);
body = body.concat(casperChangelog);
}
// CASE: clean before upload
body = body.filter((item) => {
return item !== undefined;