From 22ec6113fccc31a6d605df7e2a65d694bed02eaf Mon Sep 17 00:00:00 2001 From: teenager-ETH Date: Mon, 23 Dec 2024 20:20:56 +0100 Subject: [PATCH] fix code label_pr.js --- .github/assets/label_pr.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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);