diff --git a/CHANGELOG.md b/CHANGELOG.md index 7104b20..afb7fcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixes - Don't update from a manually-updated prerelease to a latest stable release that is earlier than the prerelease ([#78](https://github.com/getsentry/github-workflows/pull/78)) +- Cross-repo links in changelog notes ([#82](https://github.com/getsentry/github-workflows/pull/82)) ## 2.11.0 diff --git a/updater/scripts/get-changelog.ps1 b/updater/scripts/get-changelog.ps1 index 8be945f..d7ae438 100644 --- a/updater/scripts/get-changelog.ps1 +++ b/updater/scripts/get-changelog.ps1 @@ -21,7 +21,7 @@ try git clone --depth 1 $RepoUrl $tmpDir $file = $(Get-ChildItem -Path $tmpDir | Where-Object { $_.Name -match '^changelog(\.md|\.txt|)$' } ) - if ("$file" -eq "") + if ("$file" -eq '') { Write-Warning "Couldn't find a changelog" return @@ -41,7 +41,7 @@ finally } $foundFirst = $false -$changelog = "" +$changelog = '' for ($i = 0; $i -lt $lines.Count; $i++) { $line = $lines[$i] @@ -70,11 +70,11 @@ if ($changelog.Length -gt 1) { $changelog = "# Changelog`n$changelog" # Increase header level by one. - $changelog = $changelog -replace "(#+) ", '$1# ' + $changelog = $changelog -replace '(^|\n)(#+) ', '$1$2# ' # Remove at-mentions. $changelog = $changelog -replace '@', '' # Make PR/issue references into links to the original repository (unless they already are links). - $changelog = $changelog -replace '(?