aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2020-07-01 17:14:31 -0400
committerMichał Górny <mgorny@gentoo.org>2021-08-15 10:20:17 +0200
commit6a60bc33530f416429d09a47fbcc565a0e20ff93 (patch)
tree2d8d003094f5e1b46ff032a8cb106c9afa4b768a
parentBug 1575003 - Can't link to gitlab issues in the "see also" field (diff)
downloadbugzilla-6a60bc33530f416429d09a47fbcc565a0e20ff93.tar.gz
bugzilla-6a60bc33530f416429d09a47fbcc565a0e20ff93.tar.bz2
bugzilla-6a60bc33530f416429d09a47fbcc565a0e20ff93.zip
Bug 1645768 - Please add 'See Also' support for GitLabgentoo-5.0.6.13
Taken from https://github.com/mozilla-bteam/bmo/pull/1584. Thanks to asturm for digging it up. Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--Bugzilla/BugUrl/GitLab.pm6
-rw-r--r--template/en/default/global/user-error.html.tmpl1
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 @@
<li>A b[% %]ug in a MantisBT installation.</li>
<li>A b[% %]ug on sourceforge.net.</li>
<li>An issue/pull request on github.com.</li>
+ <li>An issue/merge request on a GitLab system.</li>
<li>A task on a Flyspray tracking system.</li>
[% Hook.process('bug_url_invalid_tracker') %]
</ul>