]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1641117 - Add Sentry to the list of See Also URLs.
authordklawren <dklawren@users.noreply.github.com>
Tue, 2 Jun 2020 02:34:59 +0000 (22:34 -0400)
committerGitHub <noreply@github.com>
Tue, 2 Jun 2020 02:34:59 +0000 (22:34 -0400)
Bugzilla/BugUrl.pm
Bugzilla/BugUrl/MozSentry.pm [new file with mode: 0644]
template/en/default/global/user-error.html.tmpl

index b1dec460f80341919be2d3e10d5d623a32643298..dd0c0a58234e72deaf2306f48ac8007375e3301d 100644 (file)
@@ -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 (file)
index 0000000..5f211d9
--- /dev/null
@@ -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;
index 22a71e75be2f12190cb0601cb714b8984f09d4ee..8e776504e96c6f7e25f2763a00c042b3d1caed4d 100644 (file)
         <li>A request on ServiceNow.</li>
         <li>A ticket on hellosplat.com.</li>
         <li>A revision, support ticket, or task in Phabricator.</li>
+        <li>A Mozilla Sentry issue.</li>
       </ul>
     [% ELSIF reason == 'id' %]
       There is no valid [% terms.bug %] id in that URL.