Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/provider/PhabricatorJIRAAuthProvider.php
Show First 20 Lines • Show All 329 Lines • ▼ Show 20 Lines | public function shouldCreateJIRAComment() { | ||||
return $config->getProperty(self::PROPERTY_REPORT_COMMENT, true); | return $config->getProperty(self::PROPERTY_REPORT_COMMENT, true); | ||||
} | } | ||||
/* -( DoorkeeperRemarkupURIInterface )------------------------------------- */ | /* -( DoorkeeperRemarkupURIInterface )------------------------------------- */ | ||||
public function getDoorkeeperURIRef(PhutilURI $uri) { | public function getDoorkeeperURIRef(PhutilURI $uri) { | ||||
$uri_string = phutil_string_cast($uri); | $uri_string = phutil_string_cast($uri); | ||||
$pattern = '((https?://\S+?)/browse/([A-Z]+-[1-9]\d*))'; | $pattern = '((https?://\S+?)/browse/([A-Z][A-Z0-9]*-[1-9]\d*))'; | ||||
$matches = null; | $matches = null; | ||||
if (!preg_match($pattern, $uri_string, $matches)) { | if (!preg_match($pattern, $uri_string, $matches)) { | ||||
return null; | return null; | ||||
} | } | ||||
if (strlen($uri->getFragment())) { | if (strlen($uri->getFragment())) { | ||||
return null; | return null; | ||||
} | } | ||||
Show All 24 Lines |