From d0acf505c5a451b8f90c84628398b42d65dabc42 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Fri, 29 May 2015 12:22:20 -0400 Subject: Bug 1165866: "See Also" allows github issues but not github pull requests --- Bugzilla/BugUrl/GitHub.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Bugzilla/BugUrl') 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 { -- cgit v1.2.3-24-g4f1b