diff --git a/.changeset/backstage-changelog.js b/.changeset/backstage-changelog.js index 74d06f57ba..61734f9f67 100644 --- a/.changeset/backstage-changelog.js +++ b/.changeset/backstage-changelog.js @@ -32,7 +32,23 @@ async function getDependencyReleaseLine(changesets, dependenciesUpdated) { return ['- Updated dependencies', ...updatedDependenciesList].join('\n'); } +async function getReleaseLine(changeset, type, options) { + const { ignoreUserThanks: users = [] } = options ?? {}; + const ignoredLinks = new Set( + users.map(user => `[@${user}](https://github.com/${user})`), + ); + const releaseLine = await defaultChangelogFunctions.getReleaseLine( + changeset, + type, + options, + ); + return releaseLine.replace(/Thanks\s(.*)!\s/g, (_, group) => { + const links = group.split(', ').filter(link => !ignoredLinks.has(link)); + return links.length ? `Thanks ${links.join(', ')}! ` : ''; + }); +} + module.exports = { - getReleaseLine: defaultChangelogFunctions.getReleaseLine, + getReleaseLine, getDependencyReleaseLine, }; diff --git a/.changeset/config.json b/.changeset/config.json index 35d672a425..fe78edc9cf 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,6 +1,12 @@ { "$schema": "https://unpkg.com/@changesets/config@1.3.0/schema.json", - "changelog": ["./backstage-changelog.js", { "repo": "backstage/backstage" }], + "changelog": [ + "./backstage-changelog.js", + { + "repo": "backstage/backstage", + "ignoreUserThanks": ["benjdlambert", "freben", "jhaals", "Rugvip"] + } + ], "commit": false, "linked": [], "access": "public",