{"record":{"id":"d62d76f3937ffc77","repo":"phacility/phabricator","slug":"this-commit-s-is-associated-with-a-hosted-rep","errorCode":null,"errorMessage":"This commit (\"%s\") is associated with a hosted repository (\"%s\"). Repositories must be imported from GitHub to be built with CircleCI.","messagePattern":"This commit \\(\"(.+?)\"\\) is associated with a hosted repository \\(\"(.+?)\"\\)\\. Repositories must be imported from GitHub to be built with CircleCI\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/repository/storage/PhabricatorRepositoryCommit.php","lineNumber":702,"sourceCode":"    );\n  }\n\n  public function newBuildableEngine() {\n    return new DiffusionBuildableEngine();\n  }\n\n\n/* -(  HarbormasterCircleCIBuildableInterface  )----------------------------- */\n\n\n  public function getCircleCIGitHubRepositoryURI() {\n    $repository = $this->getRepository();\n\n    $commit_phid = $this->getPHID();\n    $repository_phid = $repository->getPHID();\n\n    if ($repository->isHosted()) {\n      throw new Exception(\n        pht(\n          'This commit (\"%s\") is associated with a hosted repository '.\n          '(\"%s\"). Repositories must be imported from GitHub to be built '.\n          'with CircleCI.',\n          $commit_phid,\n          $repository_phid));\n    }\n\n    $remote_uri = $repository->getRemoteURI();\n    $path = HarbormasterCircleCIBuildStepImplementation::getGitHubPath(\n      $remote_uri);\n    if (!$path) {\n      throw new Exception(\n        pht(\n          'This commit (\"%s\") is associated with a repository (\"%s\") which '.\n          'has a remote URI (\"%s\") that does not appear to be hosted on '.\n          'GitHub. Repositories must be hosted on GitHub to be built with '.\n          'CircleCI.',","sourceCodeStart":684,"sourceCodeEnd":720,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/storage/PhabricatorRepositoryCommit.php#L684-L720","documentation":"getCircleCIGitHubRepositoryURI() (PhabricatorRepositoryCommit.php:695-727) implements HarbormasterCircleCIBuildableInterface for commits. Phabricator can only trigger CircleCI builds on repositories it observes that live on GitHub; a repository marked as Hosted (Phabricator itself is the origin) fails immediately, because CircleCI would never be able to fetch the commits.","triggerScenarios":"A Harbormaster build plan containing a CircleCI build step (HarbormasterCircleCIBuildStepImplementation) executes against a Diffusion commit whose repository is configured as 'Hosted' in the repository's hosting/serve settings.","commonSituations":"One generic build plan applied to all repositories, including locally-hosted ones; migrating a repository from observed-on-GitHub to hosted-in-Phabricator without updating the build plan; misunderstanding that the CircleCI step is an observation-side adapter, not a generic CI trigger.","solutions":["Remove the CircleCI step from any build plan that runs against hosted repositories","Or move the code to GitHub and reconfigure the repository as an observed repository pointing at the GitHub remote","For hosted repositories, switch to a CI adapter that can fetch from Phabricator (e.g., Jenkins/other Harbormaster step types)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before attaching/running a CircleCI step, verify the repo is observed, not hosted.\nif ($repository->isHosted()) {\n  // skip or fail the plan with a clear message; do not call\n  // getCircleCIGitHubRepositoryURI()\n}","typeGuard":"function canUseCircleCI(PhabricatorRepository $repository) {\n  return !$repository->isHosted()\n    && HarbormasterCircleCIBuildStepImplementation::getGitHubPath(\n         $repository->getRemoteURI()) !== null;\n}","tryCatchPattern":"try {\n  $uri = $commit->getCircleCIGitHubRepositoryURI();\n} catch (Exception $ex) {\n  // Configuration error: fail the build target with a readable message\n  // instead of crashing the worker.\n  $build_target->log($ex->getMessage());\n  throw new HarbormasterBuildFailureException();\n}","preventionTips":["Maintain separate build plans for hosted vs observed repositories","When flipping a repository from observed to hosted, audit build plans that reference it","Document that CircleCI steps only work on GitHub-hosted observed repositories"],"tags":["phabricator","harbormaster","circleci","ci-integration","repository-configuration","php"],"backgroundTag":"ci-unsupported-repository","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}