File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,12 @@ export async function generateChangelog(
61
61
}
62
62
63
63
if ( lastReleaseVersion ) {
64
- // Find all the commits between the current release and the last release.
64
+ // Find all the commits in the branch for the current release that aren't in the branch for the last release.
65
+ const currentBranch = branchFromVersion ( currentVersion , channel )
66
+ const previousBranch = branchFromVersion ( lastReleaseVersion , channel )
67
+
65
68
const command = shell . exec (
66
- `git --no-pager log ${ lastReleaseVersion } ... ${ currentVersion } --pretty=format:%H` ,
69
+ `git --no-pager log ^ ${ previousBranch } ${ currentBranch } --pretty=format:%H` ,
67
70
{ silent : true }
68
71
)
69
72
@@ -80,6 +83,13 @@ export async function generateChangelog(
80
83
}
81
84
}
82
85
86
+ function branchFromVersion ( version : string , channel : string ) : string {
87
+ return `origin/${ channel } _release/${ version . substring (
88
+ 0 ,
89
+ version . indexOf ( '_' )
90
+ ) } `
91
+ }
92
+
83
93
// Fetches PR body text from a series of commits.
84
94
async function fetchPullRequestBodyFromCommits (
85
95
commits : string [ ] ,
You can’t perform that action at this time.
0 commit comments