From 62fbb4151ee38d974815ff609fde8dbcb2b12eab Mon Sep 17 00:00:00 2001 From: Adam Thornton Date: Wed, 14 Feb 2024 16:20:20 -0700 Subject: [PATCH] Fix linkticket --- scripts/linkticket.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/linkticket.coffee b/scripts/linkticket.coffee index 401c4d3..7aed17c 100644 --- a/scripts/linkticket.coffee +++ b/scripts/linkticket.coffee @@ -38,7 +38,7 @@ module.exports = (robot) -> txt = txt.replace(/`.*?`/g, "") # Protect explicit Jira URLs by making them non-URLs txt = txt.replace(/// - (#{url}/\browse\/) + (#{url})\/browse\/ ///g, "") # Protect "tickets/DM-" (only) when not part of a URL or path txt = txt.replace(/tickets\/DM-/g, "DM-") @@ -75,7 +75,7 @@ issueResponses = (robot, msg) -> robot.http(urlstr,{ecdhCurve: 'auto'}).auth(user, pwd).get() (err, res, body) -> # The callback only sees the latest versions of these variables, # so regenerate them from the response - urlstr = url + "#{url}#{res.req.path}" + urlstr = "#{url}#{res.req.path}" ticketId = res.req.path ticketId = ticketId.replace(/.*\//, "") if (not res)