Skip to content

meta: Fix changelog script #12069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions scripts/get-commit-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Loading