diff options
Diffstat (limited to 'Bugzilla/BugUrl/GitHub.pm')
-rw-r--r-- | Bugzilla/BugUrl/GitHub.pm | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Bugzilla/BugUrl/GitHub.pm b/Bugzilla/BugUrl/GitHub.pm index f14f1d6b0..583837a60 100644 --- a/Bugzilla/BugUrl/GitHub.pm +++ b/Bugzilla/BugUrl/GitHub.pm @@ -18,25 +18,25 @@ use parent qw(Bugzilla::BugUrl); ############################### sub should_handle { - my ($class, $uri) = @_; - - # 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|pull)/\d+$!) ? 1 : 0; + my ($class, $uri) = @_; + +# 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|pull)/\d+$!) ? 1 : 0; } sub _check_value { - my ($class, $uri) = @_; + my ($class, $uri) = @_; - $uri = $class->SUPER::_check_value($uri); + $uri = $class->SUPER::_check_value($uri); - # GitHub HTTP URLs redirect to HTTPS, so just use the HTTPS scheme. - $uri->scheme('https'); + # GitHub HTTP URLs redirect to HTTPS, so just use the HTTPS scheme. + $uri->scheme('https'); - return $uri; + return $uri; } 1; |