mirror of
https://github.com/n8n-io/n8n
synced 2026-04-19 13:05:54 +02:00
ci: Strip backport information from commit labels on changelog (#27203)
This commit is contained in:
10
.github/scripts/update-changelog.mjs
vendored
10
.github/scripts/update-changelog.mjs
vendored
@@ -30,7 +30,15 @@ const changelogStream = new ConventionalChangelog()
|
||||
const isBenchmarkScope = commit.scope === 'benchmark';
|
||||
|
||||
// Ignore commits that have 'benchmark' scope or '(no-changelog)' in the header
|
||||
return hasNoChangelogInHeader || isBenchmarkScope ? null : commit;
|
||||
if (hasNoChangelogInHeader || isBenchmarkScope) return null;
|
||||
|
||||
// Strip backport information from commit subject, e.g.:
|
||||
// "Fix something (backport to release-candidate/2.12.x) (#123)" → "Fix something (#123)"
|
||||
if (commit.subject) {
|
||||
commit.subject = commit.subject.replace(/\s*\(backport to [^)]+\)/g, '');
|
||||
}
|
||||
|
||||
return commit;
|
||||
},
|
||||
})
|
||||
.writeStream()
|
||||
|
||||
Reference in New Issue
Block a user