/** * Create new project from ['gitlab']['project-name'] * @return boolean */ public function createProject() { $project = new Project(); if ($this->idgroup) { $project->create($this->client, $this->config['gitlab']['project-name'], array('description' => 'Mikrotik RouterOS backup files.', 'namespace_id' => $this->getGroupID(), 'issues_enabled' => false)); return $this->checkProjectName(); } $project->create($this->client, $this->config['gitlab']['project-name'], array('description' => 'Mikrotik RouterOS backup files.', 'issues_enabled' => false)); return $this->checkProjectName(); }
/** * @param Project $project * @return array|\Gitlab\Model\Project|null */ public function createProject(Project $project) { // Fast Return in case of server stopped if (!$this->isServerAvailable()) { return null; } // Creating project $gitLabProject = \Gitlab\Model\Project::create($this->gitLabClient, $project->getName(), array('description' => $project->getDescription(), 'issue_enabled' => $project->isGitLabIssueEnabled(), 'wiki_enabled' => $project->isGitLabWikiEnabled(), 'snippets_enabled' => $project->isGitLabSnippetsEnabled(), 'builds_enabled' => false)); // returning created object return $gitLabProject; }