]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1088399 - Add support for Github pull requests in See Also field. r=gerv, a=glob.
authorMatt Selsky <selsky@columbia.edu>
Fri, 24 Oct 2014 08:22:20 +0000 (09:22 +0100)
committerGervase Markham <gerv@gerv.net>
Fri, 24 Oct 2014 08:22:20 +0000 (09:22 +0100)
Bugzilla/BugUrl/GitHub.pm
template/en/default/global/user-error.html.tmpl

index 22814dc50e1d4aea57147794874bbf469d681f29..f14f1d6b05c9cc0f1cb61f341d6499e551fa236e 100644 (file)
@@ -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 {
index ed0748760808f9d836547ee51d9b222de4e543ee..81bfe7f30a0078a263ca7bc81328cea24d767bb7 100644 (file)
         <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>An issue/pull request on github.com.</li>
         [% Hook.process('bug_url_invalid_tracker') %]
       </ul>
     [% END %]