File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11Write-Output ' Generating release notes ...'
22# region GitHub release notes
3- $previousRelease = (Invoke-RestMethod - Uri " https://api.github.com/repos/$env: APPVEYOR_REPO_NAME /releases/latest?access_token=$env: GITHUB_ACCESS_TOKEN " )
4- $compare = (Invoke-RestMethod - Uri " https://api.github.com/repos/$env: APPVEYOR_REPO_NAME /compare/$ ( $previousRelease.target_commitish ) ...$env: APPVEYOR_REPO_COMMIT `?access_token=$env: GITHUB_ACCESS_TOKEN " )
3+ $previousRelease = (Invoke-RestMethod - Uri " https://api.github.com/repos/$env: APPVEYOR_REPO_NAME /releases/latest?access_token=$env: GITHUB_ACCESS_TOKEN " - Verbose )
4+ $compare = (Invoke-RestMethod - Uri " https://api.github.com/repos/$env: APPVEYOR_REPO_NAME /compare/$ ( $previousRelease.target_commitish ) ...$env: APPVEYOR_REPO_COMMIT `?access_token=$env: GITHUB_ACCESS_TOKEN " - Verbose )
55$releaseNotes = " ## Release Notes`n #### Version [$env: APPVEYOR_REPO_TAG_NAME ](https://github.com/$env: APPVEYOR_REPO_NAME /tree/$env: APPVEYOR_REPO_TAG_NAME )`n "
6+ $commits = $compare.commits | Sort-Object - Property @ {Expression = {$_.commit.author.date };} - Descending | Select-Object - SkipLast 1
67
7- if ($null -ne $compare . commits -and $compare . commits.Length -gt 0 ) {
8+ if ($null -ne $commits -and $commits.Length -gt 0 ) {
89 $releaseNotes += " `n Commit | Description`n --- | ---`n "
910 $contributions = @ {}
10- $compare . commits | Sort-Object - Property @ { Expression = { $_ .commit.author.date };} - Descending | ForEach-Object {
11+ $commits | ForEach-Object {
1112 $commitMessage = $_.commit.message.Replace (" `r`n " , " " ).Replace(" `n " , " " );
1213 if ($commitMessage.ToLower ().StartsWith(' merge' ) -or
1314 $commitMessage.ToLower ().StartsWith(' merging' ) -or
You can’t perform that action at this time.
0 commit comments