From 6a60bc33530f416429d09a47fbcc565a0e20ff93 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Wed, 1 Jul 2020 17:14:31 -0400 Subject: Bug 1645768 - Please add 'See Also' support for GitLab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Taken from https://github.com/mozilla-bteam/bmo/pull/1584. Thanks to asturm for digging it up. Signed-off-by: Michał Górny --- Bugzilla/BugUrl/GitLab.pm | 6 +++--- template/en/default/global/user-error.html.tmpl | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Bugzilla/BugUrl/GitLab.pm b/Bugzilla/BugUrl/GitLab.pm index 8e546c1dc..d2e75dcce 100644 --- a/Bugzilla/BugUrl/GitLab.pm +++ b/Bugzilla/BugUrl/GitLab.pm @@ -20,9 +20,9 @@ use base qw(Bugzilla::BugUrl); sub should_handle { my ($class, $uri) = @_; -# GitLab issue URLs can have the form: -# https://gitlab.com/projectA/subprojectB/subprojectC/../issues/53 - return ($uri->path =~ m!^/.*/issues/\d+$!) ? 1 : 0; + # 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; } sub _check_value { diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 63655b926..79611ebed 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -291,6 +291,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 task on a Flyspray tracking system.
  • [% Hook.process('bug_url_invalid_tracker') %] -- cgit v1.2.3-65-gdbad