Skip to content

Commit 3fe8c55

Browse files
committed
Parse GitLab merge request URLs to identify those in Launchpad
(#3788, #3795)
1 parent e3f177e commit 3fe8c55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/git/models/pullRequest.utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ export function getPullRequestIdentityValuesFromSearch(search: string): PullRequ
1515
let ownerAndRepo: string | undefined = undefined;
1616
let prNumber: string | undefined = undefined;
1717

18-
let match = search.match(/([^/]+\/[^/]+)\/pull\/(\d+)/); // with org and rep name
18+
let match = search.match(/([^/]+\/[^/]+)\/(?:pull|-\/merge_requests)\/(\d+)/); // with org and rep name
1919
if (match != null) {
2020
ownerAndRepo = match[1];
2121
prNumber = match[2];
2222
}
2323

2424
if (prNumber == null) {
25-
match = search.match(/(?:\/|^)pull\/(\d+)/); // without repo name
25+
match = search.match(/(?:\/|^)(?:pull|-\/merge_requests)\/(\d+)/); // without repo name
2626
if (match != null) {
2727
prNumber = match[1];
2828
}

0 commit comments

Comments
 (0)