Skip to content

Commit ecbd0c4

Browse files
committed
guessReleaseNotes: use best URL for 'Bash' updates
Currently the code uses the last URL. But for `Bash` updates, we receive the commit URLs, and if multiple patches are included in the ticket, the newest comes _first_. Therefore we need to pick the first URL in that case. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent b04e543 commit ecbd0c4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

GitForWindowsHelper/component-updates.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ const guessReleaseNotes = (issue) => {
5858
package_name = prettyPackageName(package_name.replace(/^mingw-w64-/, ''))
5959

6060
const matchURLInIssue = (issue) => {
61-
const match = issue.body.match(/(?:^|\n)(https:\/\/\S+)$/)
61+
const match = issue.body.match(package_name.toLowerCase() === 'bash'
62+
? /(?:^|\n)(https:\/\/\S+)/ // for `bash`, use the first URL
63+
: /(?:^|\n)(https:\/\/\S+)$/)
6264
return match && match[1]
6365
}
6466

0 commit comments

Comments
 (0)