diff --git a/scripts/get-commit-list.ts b/scripts/get-commit-list.ts index e64645692ed4..3992694cf8f0 100644 --- a/scripts/get-commit-list.ts +++ b/scripts/get-commit-list.ts @@ -3,11 +3,19 @@ import { execSync } from 'child_process'; function run(): void { const commits = execSync('git log --format="- %s"').toString().split('\n'); - const lastReleasePos = commits.findIndex(commit => commit.includes("Merge branch 'release")); + const lastReleasePos = commits.findIndex(commit => /- meta(.*)changelog/i.test(commit)); const newCommits = commits.splice(0, lastReleasePos).filter(commit => { - // Filter out master/develop merges - if (/Merge pull request #(\d+) from getsentry\/(master|develop)/.test(commit)) { + // Filter out merge commits + if (/Merge pull request/.test(commit)) { + return false; + } + // Filter release branch merged + if (/Merge branch/.test(commit)) { + return false; + } + // Filter release commit itself + if (/release:/.test(commit)) { return false; }