From: dklawren Date: Tue, 2 Jun 2020 02:34:59 +0000 (-0400) Subject: Bug 1641117 - Add Sentry to the list of See Also URLs. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb77856ed1937efe86ef05476a9564bb4d079035;p=thirdparty%2Fbugzilla.git Bug 1641117 - Add Sentry to the list of See Also URLs. --- diff --git a/Bugzilla/BugUrl.pm b/Bugzilla/BugUrl.pm index b1dec460f..dd0c0a582 100644 --- a/Bugzilla/BugUrl.pm +++ b/Bugzilla/BugUrl.pm @@ -63,6 +63,7 @@ use constant SUB_CLASSES => qw( Bugzilla::BugUrl::JIRA Bugzilla::BugUrl::Trac Bugzilla::BugUrl::MantisBT + Bugzilla::BugUrl::MozSentry Bugzilla::BugUrl::SourceForge Bugzilla::BugUrl::GitHub Bugzilla::BugUrl::GitLab diff --git a/Bugzilla/BugUrl/MozSentry.pm b/Bugzilla/BugUrl/MozSentry.pm new file mode 100644 index 000000000..5f211d9bd --- /dev/null +++ b/Bugzilla/BugUrl/MozSentry.pm @@ -0,0 +1,28 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This Source Code Form is "Incompatible With Secondary Licenses", as +# defined by the Mozilla Public License, v. 2.0. + +package Bugzilla::BugUrl::MozSentry; + +use 5.10.1; +use strict; +use warnings; + +use base qw(Bugzilla::BugUrl); + +sub should_handle { + my ($class, $uri) = @_; + return $uri =~ m{^https?://sentry[.]prod[.]mozaws[.]net/operations/[^/]+/issues/\d+/?$}sxm; +} + +sub _check_value { + my ($class, $uri) = @_; + $uri = $class->SUPER::_check_value($uri); + $uri->scheme('https'); # force https + return $uri; +} + +1; diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 22a71e75b..8e776504e 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -364,6 +364,7 @@
  • A request on ServiceNow.
  • A ticket on hellosplat.com.
  • A revision, support ticket, or task in Phabricator.
  • +
  • A Mozilla Sentry issue.
  • [% ELSIF reason == 'id' %] There is no valid [% terms.bug %] id in that URL.