Skip to content

Commit 2aa6651

Browse files
Fix ReleaseTools issue matcher regex (#3549)
The simpler "anything but a digit" logic failed on an edge case with a recent PR that had another URL with digits in it after the word "Fix" so we had to make this more explicit.
1 parent a29e7f9 commit 2aa6651

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/ReleaseTools.psm1

+3-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ function Get-Bullets {
108108
'resolved'
109109
)
110110

111-
$IssueRegex = '(' + ($CloseKeywords -join '|') + ')\s+(?<repo>\D+)(?<number>\d+)'
111+
# NOTE: The URL matcher must be explicit because the body of a PR may
112+
# contain other URLs with digits (like an image asset).
113+
$IssueRegex = '(' + ($CloseKeywords -join '|') + ')\s+((https://github.com/PowerShell/(?<repo>(' + ([RepoNames]::Values -join '|') + '))/issues/)|#)(?<number>\d+)'
112114
}
113115

114116
process {

0 commit comments

Comments
 (0)