summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@mozilla.com>2015-05-29 18:22:20 +0200
committerDylan William Hardison <dylan@hardison.net>2015-05-29 18:22:20 +0200
commitd0acf505c5a451b8f90c84628398b42d65dabc42 (patch)
tree71c29cd5801d791cee84ffb28d0cfe5ee52bb33d
parent09f53409bf172a3d6452d992e3afce7cd7879f12 (diff)
downloadbugzilla-d0acf505c5a451b8f90c84628398b42d65dabc42.tar.gz
bugzilla-d0acf505c5a451b8f90c84628398b42d65dabc42.tar.xz
Bug 1165866: "See Also" allows github issues but not github pull requests
-rw-r--r--Bugzilla/BugUrl/GitHub.pm6
-rw-r--r--template/en/default/global/user-error.html.tmpl4
2 files changed, 6 insertions, 4 deletions
diff --git a/Bugzilla/BugUrl/GitHub.pm b/Bugzilla/BugUrl/GitHub.pm
index 63be65bed..29f3c2ea4 100644
--- a/Bugzilla/BugUrl/GitHub.pm
+++ b/Bugzilla/BugUrl/GitHub.pm
@@ -18,8 +18,10 @@ sub should_handle {
# GitHub issue URLs have only one form:
# https://github.com/USER_OR_TEAM_OR_ORGANIZATION_NAME/REPOSITORY_NAME/issues/111
- return ($uri->authority =~ /^github.com$/i
- and $uri->path =~ m|^/[^/]+/[^/]+/issues/\d+$|) ? 1 : 0;
+ # 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|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 082649947..5b2f50116 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -299,8 +299,8 @@
<li>A ticket in a Trac installation.</li>
<li>A b[% %]ug in a MantisBT installation.</li>
<li>A b[% %]ug on sourceforge.net.</li>
- <li>An issue on github.com.</li>
- <li>A question on support.mozilla.org</li>
+ <li>An issue/pull request on github.com.</li>
+ <li>A question on support.mozilla.org.</li>
<li>An issue on webcompat.com.</li>
</ul>
[% ELSIF reason == 'id' %]