Skip to content
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