add getProjectTitle convenience method to the Build class.
This commit is contained in:
parent
4d5f4b44b7
commit
2b93fe0c94
|
@ -27,7 +27,7 @@ class BuildInterpolator
|
|||
$this->interpolation_vars['%COMMIT%'] = $build->getCommitId();
|
||||
$this->interpolation_vars['%PROJECT%'] = $build->getProjectId();
|
||||
$this->interpolation_vars['%BUILD%'] = $build->getId();
|
||||
$this->interpolation_vars['%PROJECT_TITLE%'] = $build->getProject()->getTitle();
|
||||
$this->interpolation_vars['%PROJECT_TITLE%'] = $build->getProjectTitle();
|
||||
$this->interpolation_vars['%BUILD_PATH%'] = $buildPath;
|
||||
$this->interpolation_vars['%BUILD_URI%'] = $phpCiUrl . "build/view/" . $build->getId();
|
||||
$this->interpolation_vars['%PHPCI_COMMIT%'] = $this->interpolation_vars['%COMMIT%'];
|
||||
|
|
|
@ -36,6 +36,15 @@ class Build extends BuildBase
|
|||
return '#';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getProjectTitle()
|
||||
{
|
||||
$project = $this->getProject();
|
||||
return $project ? $project->getTitle() : "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get link to branch from another source (i.e. Github)
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue