Skip to content

Commit e939972

Browse files
committed
chore: move "Thanks @user!" to end of changeset entries
Custom changelog wrapper that post-processes @changesets/changelog-github output to produce: `- [#PR] [commit] - Description (Thanks @user!)`
1 parent e8e4417 commit e939972

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

.changeset/changelog-config.cjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const github = require("@changesets/changelog-github");
2+
const base = github.default;
3+
4+
module.exports.default = {
5+
getDependencyReleaseLine: base.getDependencyReleaseLine,
6+
getReleaseLine: async (...args) => {
7+
const line = await base.getReleaseLine(...args);
8+
// Move "Thanks @user!" from before the description to after it
9+
return line.replace(/ Thanks ([^!]+!)( -)(.+)/, "$2$3 (Thanks $1)");
10+
},
11+
};

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
33
"changelog": [
4-
"@changesets/changelog-github",
4+
"./.changeset/changelog-config.cjs",
55
{ "repo": "SalesforceCommerceCloud/b2c-developer-tooling" }
66
],
77
"commit": false,

0 commit comments

Comments
 (0)