From df084c7ebb2744a1b3bad49c46aadc1a5f454652 Mon Sep 17 00:00:00 2001 From: Sergei Shmakov Date: Thu, 21 Nov 2024 17:43:04 +0100 Subject: [PATCH] Parse GitLab merge request URLs to identify those in Launchpad (#3788, #3795) --- src/git/models/pullRequest.utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/git/models/pullRequest.utils.ts b/src/git/models/pullRequest.utils.ts index 0f6bf01d819b3..57df8970a25de 100644 --- a/src/git/models/pullRequest.utils.ts +++ b/src/git/models/pullRequest.utils.ts @@ -11,14 +11,14 @@ export function getPullRequestIdentityValuesFromSearch(search: string): PullRequ let ownerAndRepo: string | undefined = undefined; let prNumber: string | undefined = undefined; - let match = search.match(/([^/]+\/[^/]+)\/pull\/(\d+)/); // with org and rep name + let match = search.match(/([^/]+\/[^/]+)\/(?:pull|-\/merge_requests)\/(\d+)/); // with org and rep name if (match != null) { ownerAndRepo = match[1]; prNumber = match[2]; } if (prNumber == null) { - match = search.match(/(?:\/|^)pull\/(\d+)/); // without repo name + match = search.match(/(?:\/|^)(?:pull|-\/merge_requests)\/(\d+)/); // without repo name if (match != null) { prNumber = match[1]; }