From 71f16978be9143ffe8e5baeb3c44845e7c0d84cd Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Wed, 1 Jul 2020 17:14:31 -0400 Subject: [PATCH 1/2] Bug 1645768 - Please add 'See Also' support for GitLab --- Bugzilla/BugUrl/GitLab.pm | 5 +++-- template/en/default/global/user-error.html.tmpl | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Bugzilla/BugUrl/GitLab.pm b/Bugzilla/BugUrl/GitLab.pm index 8e546c1dce..2cb7b10901 100644 --- a/Bugzilla/BugUrl/GitLab.pm +++ b/Bugzilla/BugUrl/GitLab.pm @@ -20,9 +20,10 @@ use base qw(Bugzilla::BugUrl); sub should_handle { my ($class, $uri) = @_; -# GitLab issue URLs can have the form: +# GitLab issue and merge request URLs can have the form: # https://gitlab.com/projectA/subprojectB/subprojectC/../issues/53 - return ($uri->path =~ m!^/.*/issues/\d+$!) ? 1 : 0; +# https://gitlab.com/projectA/subprojectB/subprojectC../merge_requests/53 + return ($uri->path =~ m!^/.*/(issues|merge_requests)/\d+$!) ? 1 : 0; } sub _check_value { diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 8e776504e9..0bfe3a414d 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -358,6 +358,7 @@
  • A b[% %]ug in a MantisBT installation.
  • A b[% %]ug on sourceforge.net.
  • An issue/pull request on github.com.
  • +
  • An issue/merge request on a GitLab system.
  • A question on support.mozilla.org.
  • An Aha feature on aha.io.
  • An issue on webcompat.com.
  • From 9cafd984c0e6484eafbe773fa4795f34335afbb0 Mon Sep 17 00:00:00 2001 From: dklawren Date: Tue, 7 Jul 2020 10:55:43 -0400 Subject: [PATCH 2/2] Updated comment in GitLab.pm --- Bugzilla/BugUrl/GitLab.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Bugzilla/BugUrl/GitLab.pm b/Bugzilla/BugUrl/GitLab.pm index 2cb7b10901..d2e75dcce0 100644 --- a/Bugzilla/BugUrl/GitLab.pm +++ b/Bugzilla/BugUrl/GitLab.pm @@ -20,9 +20,8 @@ use base qw(Bugzilla::BugUrl); sub should_handle { my ($class, $uri) = @_; -# GitLab issue and merge request URLs can have the form: -# https://gitlab.com/projectA/subprojectB/subprojectC/../issues/53 -# https://gitlab.com/projectA/subprojectB/subprojectC../merge_requests/53 + # GitLab issue and merge request URLs can have the form: + # https://gitlab.com/projectA/subprojectB/subprojectC/../(issues|merge_requests)/53 return ($uri->path =~ m!^/.*/(issues|merge_requests)/\d+$!) ? 1 : 0; }