Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const changelog_lines = changelog.split("\n");
CHANGELOG.header = changelog_lines.splice(0, 2).join("\n");
CHANGELOG.changes = changelog_lines.splice(2, changelog_lines.length - 6).join("\n");
// Get changelog body.
const tag_message = run("git", ["cat-file", "-p", COMMIT_TAG])[1].toString().split("\n");
if (tag_message[0].startsWith("object")) {
CHANGELOG.body = tag_message.slice(5).join("\n");
}
resolve();
});
// Generate changelog from commit messages.
require("conventional-changelog")({
preset: "angular"
}).pipe(changelog_buffer);
});
}