From 855faaab44d9e28349f7c9e3b45d7ea01eaaaf5d Mon Sep 17 00:00:00 2001 From: Matt Selsky Date: Fri, 24 Oct 2014 09:21:53 +0100 Subject: Bug 1088399 - Add support for Github pull requests in See Also field. r=gerv, a=glob. --- Bugzilla/BugUrl/GitHub.pm | 4 +++- template/en/default/global/user-error.html.tmpl | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Bugzilla/BugUrl/GitHub.pm b/Bugzilla/BugUrl/GitHub.pm index 22814dc50..f14f1d6b0 100644 --- a/Bugzilla/BugUrl/GitHub.pm +++ b/Bugzilla/BugUrl/GitHub.pm @@ -22,8 +22,10 @@ sub should_handle { # GitHub issue URLs have only one form: # https://github.com/USER_OR_TEAM_OR_ORGANIZATION_NAME/REPOSITORY_NAME/issues/111 + # GitHub pull request URLs have only one form: + # https://github.com/USER_OR_TEAM_OR_ORGANIZATION_NAME/REPOSITORY_NAME/pull/111 return (lc($uri->authority) eq 'github.com' - and $uri->path =~ m|^/[^/]+/[^/]+/issues/\d+$|) ? 1 : 0; + and $uri->path =~ m!^/[^/]+/[^/]+/(?:issues|pull)/\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 ed0748760..81bfe7f30 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -290,7 +290,7 @@
  • A ticket in a Trac installation.
  • A b[% %]ug in a MantisBT installation.
  • A b[% %]ug on sourceforge.net.
  • -
  • An issue on github.com.
  • +
  • An issue/pull request on github.com.
  • [% Hook.process('bug_url_invalid_tracker') %] [% END %] -- cgit v1.2.1