Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
NAMESPACE,
'generateNotes',
plugin => async (pluginConfig, config) => {
const { pullRequests } = pluginConfig;
const { nextRelease } = config;
nextRelease.notes = await plugin(pluginConfig, config);
await pullRequests.forEach(
// Create "release" comment
createChangelog(pluginConfig, { ...config, nextRelease })
);
return nextRelease.notes;
},
pluginDefinitions.generateNotes.default
);
module.exports = {
verifyConditions: '@semantic-release/github',
analyzeCommits: decoratePlugins(analyzeCommits),
generateNotes: decoratePlugins(generateNotes),
};
const analyzeCommits = wrapPlugin(
NAMESPACE,
'analyzeCommits',
compose(logPluginVersion('analyzeCommits'), withOnlyPackageCommits),
pluginDefinitions.analyzeCommits.default
);
const generateNotes = wrapMultiPlugin(
NAMESPACE,
'generateNotes',
compose(
logPluginVersion('generateNotes'),
withOnlyPackageCommits,
withOptionsTransforms([mapNextReleaseVersion(versionToGitTag)])
),
pluginDefinitions.generateNotes.default
);
module.exports = {
analyzeCommits,
generateNotes,
tagFormat: readPkg.sync().name + '-v${version}',
};