docs: ignore maintainer thanks on changelogs

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2023-11-07 22:15:41 +01:00
parent 64ed66272e
commit 02635c5462
2 changed files with 25 additions and 2 deletions
+18 -1
View File
@@ -32,7 +32,24 @@ async function getDependencyReleaseLine(changesets, dependenciesUpdated) {
return ['- Updated dependencies', ...updatedDependenciesList].join('\n');
}
async function getReleaseLine(changeset, type, options) {
const { ignoreUserThanks: users = [] } = options ?? {};
const releaseLine = await defaultChangelogFunctions.getReleaseLine(
changeset,
type,
options,
);
return releaseLine.replace(/Thanks\s(.*)!\s/g, (_, group) => {
const links = group
.split(', ')
.filter(link =>
users.every(user => `[@${user}](https://github.com/${user})` !== link),
);
return links.length ? `Thanks ${links.join(', ')}! ` : '';
});
}
module.exports = {
getReleaseLine: defaultChangelogFunctions.getReleaseLine,
getReleaseLine,
getDependencyReleaseLine,
};
+7 -1
View File
@@ -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",