Add Changesets configuration and update development documentation (#1964)

Introduce Changesets for versioning and changelog generation, and
enhance development documentation to guide contributors on using
Changesets effectively.
This commit is contained in:
Zoltán Bedi
2025-02-06 10:35:36 +01:00
committed by GitHub
parent c2ffd31b1a
commit aa63bb8835
6 changed files with 477 additions and 8 deletions

32
.changeset/changelog.js Normal file
View File

@@ -0,0 +1,32 @@
const changelogFunctions = {
getReleaseLine: async (changeset, type, options) => {
let prefix = '🎉';
if (type === 'major') {
prefix = '🎉';
} else if (type === 'minor') {
prefix = '🚀';
} else if (type === 'patch') {
prefix = '🐛';
}
if (changeset && changeset.summary) {
const summary = changeset.summary || '';
if (summary.indexOf('Docs') > -1) {
prefix = '📝';
}
if (
summary.indexOf('Chore') > -1 ||
summary.indexOf('grafana-plugin-sdk-go') > -1 ||
summary.indexOf('compiled') > -1
) {
prefix = '⚙️';
}
return [prefix, summary].join(' ');
}
return [prefix, changeset?.summary].join(' ');
},
getDependencyReleaseLine: async (changesets, dependenciesUpdated, options) => {
return '\n';
},
};
module.exports = changelogFunctions;