Adding link to branch and commit for Gogs repositories

This commit is contained in:
Pélisset Vincent 2017-02-10 19:14:36 +07:00 committed by Dmitry Khomutov
parent 9040b151dc
commit efb9cacb02
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9

View file

@ -7,4 +7,21 @@ namespace PHPCensor\Model\Build;
*/
class GogsBuild extends RemoteGitBuild
{
/**
* Get link to commit from Gogs repositorie
*/
public function getCommitLink()
{
if ($this->getCommitId() !== 'manual'){
return $this->getProject()->getReference() . '/commit/' . $this->getCommitId();
}
}
/**
* Get link to branch from Gogs repositorie
*/
public function getBranchLink()
{
return $this->getProject()->getReference() . '/src/' . $this->getBranch();
}
}