From cff9aca216602caef1ebb8890ab7c886a46ceef4 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Thu, 16 May 2024 13:59:48 +0200 Subject: [PATCH] meta: Fix changelog script Actually we should check for the changelog commit, which we look for by checking `-meta` and `changelog` in the commit message. (Not perfect, but good enough hopefully...) --- scripts/get-commit-list.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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; }