private function getRemoteRepositoryInfoDone() { /** @var $gerrit_server Git_RemoteServer_GerritServer */ $gerrit_server = $this->gerrit_servers[$this->repository->getRemoteServerId()]; $driver = $this->driver_factory->getDriver($gerrit_server); $gerrit_project = $driver->getGerritProjectName($this->repository); $link = $gerrit_server->getProjectUrl($gerrit_project); $html = ''; $html .= '<div class="alert alert-info gerrit_url">'; $html .= $GLOBALS['Language']->getText('plugin_git', 'delegated_to_gerrit'); $html .= ' <a href="' . $link . '">' . $gerrit_project . '</a>'; $html .= '</div>'; return $html; }
private function getAccessURLs() { $urls = $this->repository->getAccessURL(); if ($this->repository->isMigratedToGerrit()) { $gerrit_user = $this->gerrit_usermanager->getGerritUser($this->current_user); $gerrit_server = $this->gerrit_servers[$this->repository->getRemoteServerId()]; $driver = $this->driver_factory->getDriver($gerrit_server); $gerrit_project = $driver->getGerritProjectName($this->repository); $clone_url = $gerrit_server->getEndUserCloneUrl($gerrit_project, $gerrit_user); $this->prependGerritCloneURL($urls, $clone_url); } return $urls; }
public function queueRemoteProjectReadOnly(GitRepository $repository) { $this->system_event_manager->createEvent(SystemEvent_GIT_GERRIT_PROJECT_READONLY::NAME, $repository->getId() . SystemEvent::PARAMETER_SEPARATOR . $repository->getRemoteServerId(), SystemEvent::PRIORITY_HIGH, SystemEvent::OWNER_APP); }
/** * * @param GitRepository $repository * @return Git_RemoteServer_GerritServer */ public function getServer(GitRepository $repository) { $id = $repository->getRemoteServerId(); return $this->getServerById($id); }
private function getGerritServerForRepository(GitRepository $repository) { return $this->gerrit_servers[$repository->getRemoteServerId()]; }