Example #1
0
 /**
  * Process VCS deletion
  * @param Project $project
  * @return mixed
  */
 protected function processVCSProjectDeletion(Project $project)
 {
     $returnValues['slot_name'] = 'VCS';
     try {
         $pjt = $this->gitlabApi->deleteProject($project->getGitLabProjectId());
         $returnValues['data'][] = $this->setRetVal('VCS Deletion (incomming) id', 'string', $pjt);
     } catch (\Exception $e) {
         $returnValues['data'][] = $this->setRetVal('VCS Deletion (incomming) id', 'string', null);
     }
     return $returnValues;
 }
Example #2
0
 /**
  * @param Project $project
  * @param $filePath
  * @param string $ref
  * @return mixed
  */
 public function getFile(Project $project, $filePath, $ref = 'master')
 {
     // Fast Return in case of server stopped
     if (!$this->isServerAvailable()) {
         return null;
     }
     // Create file
     $file = $this->gitLabClient->api($this::API_REPOSITORIES)->getFile($project->getGitLabProjectId(), $filePath, $ref);
     // Return created file
     return $file;
 }