Adding link to branch and commit for Gogs repositories
This commit is contained in:
parent
9040b151dc
commit
efb9cacb02
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue