diff --git a/.github/assets/label_pr.js b/.github/assets/label_pr.js index 16ace2db0327..1a8dddf76491 100644 --- a/.github/assets/label_pr.js +++ b/.github/assets/label_pr.js @@ -10,8 +10,9 @@ function shouldIncludeLabel (label) { // Get the issue number from an issue link in the forms ` ` or ` #`. function getIssueLink (repoUrl, body) { - const urlPattern = new RegExp(`(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) ${repoUrl}/issues/(?\\d+)`, 'i') - const issuePattern = new RegExp(`(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) \#(?\\d+)`, 'i') + const urlPattern = /(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) https:\/\/repoUrl\/issues\/(?\d+)/i; +const issuePattern = /(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) \#(?\d+)/i; + const urlRe = body.match(urlPattern); const issueRe = body.match(issuePattern);