Merge pull request #376 from jowy/patch-1

implement RemoteGitBuild::getFileLinkTemplate
This commit is contained in:
Dan Cryer 2014-04-30 13:52:15 +01:00
commit 2b66abf1e6

View file

@ -38,6 +38,18 @@ class GitlabBuild extends RemoteGitBuild
return 'http://' . $domain . '/' . $this->getProject()->getReference() . '/tree/' . $this->getBranch();
}
/**
* Get link to specific file (and line) in a the repo's branch
*/
public function getFileLinkTemplate()
{
return sprintf('http://%s/%s/blob/%s/{FILE}#L{LINE}',
$this->getProject()->getAccessInformation("domain"),
$this->getProject()->getReference(),
$this->getBranch()
);
}
/**
* Get the URL to be used to clone this remote repository.
*/