Differential D16100 Diff 38740 src/applications/harbormaster/step/HarbormasterCircleCIBuildStepImplementation.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/step/HarbormasterCircleCIBuildStepImplementation.php
| Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | EOTEXT | ||||
| , | , | ||||
| $hook_uri); | $hook_uri); | ||||
| } | } | ||||
| public static function getGitHubPath($uri) { | public static function getGitHubPath($uri) { | ||||
| $uri_object = new PhutilURI($uri); | $uri_object = new PhutilURI($uri); | ||||
| $domain = $uri_object->getDomain(); | $domain = $uri_object->getDomain(); | ||||
| if (!strlen($domain)) { | |||||
| $uri_object = new PhutilGitURI($uri); | |||||
| $domain = $uri_object->getDomain(); | |||||
| } | |||||
| $domain = phutil_utf8_strtolower($domain); | $domain = phutil_utf8_strtolower($domain); | ||||
| switch ($domain) { | switch ($domain) { | ||||
| case 'github.com': | case 'github.com': | ||||
| case 'www.github.com': | case 'www.github.com': | ||||
| return $uri_object->getPath(); | return $uri_object->getPath(); | ||||
| default: | default: | ||||
| return null; | return null; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 174 Lines • Show Last 20 Lines | |||||