Skip to content

Commit

Permalink
This is no merge commit.
Browse files Browse the repository at this point in the history
CHANGELOG:
- This should appear.
- So should this.
  • Loading branch information
HeikoTheissen committed Sep 26, 2021
1 parent 641ca41 commit b839f32
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
22 changes: 20 additions & 2 deletions lib/changelog.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
const changelog = require("standard-changelog");
const changelog = require("conventional-changelog-core");
const fs = require("fs");
const path = require("path");
const commitPartial = fs.readFileSync(path.resolve(require.resolve("conventional-changelog-writer"), "../templates/commit.hbs"))
.toString()
.replace("* {{header}}\n\n{{~!-- commit link --}}", "### {{committerDate}}\n{{header}}\n\n");

changelog().pipe(process.stdout);
changelog(undefined, undefined, undefined, {
noteKeywords: ["CHANGELOG"]
}, {
transform: function(commit, context) {
if (commit.notes.length === 1) {
commit.header = commit.notes[0].text;
commit.footer = null;
commit.notes = [];
return commit;
}
},
commitPartial
})
.pipe(process.stdout);
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@
},
"main": "lib/csdl2markdown.js",
"dependencies": {
"conventional-changelog-core": "^4.2.4",
"conventional-changelog-writer": "^5.0.0",
"minimist": "^1.2.0",
"odata-csdl": "^0.2.9"
},
"devDependencies": {
"c8": "^7.3.1",
"eslint": "^7.21.0",
"mocha": "^8.3.1",
"standard-changelog": "^2.0.27"
"mocha": "^8.3.1"
},
"scripts": {
"build": "node lib/transform.js",
Expand Down

0 comments on commit b839f32

Please sign in to comment.