mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-28 12:20:12 +02:00
[GitlabCommitsBridge] code simplification
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
@@ -26,16 +26,11 @@ class GitlabCommitsBridge extends BridgeAbstract{
|
||||
));
|
||||
|
||||
public function collectData(){
|
||||
$uri = $this->getInput('uri').'/'.$this->getInput('u').'/'.$this->getInput('p').'/commits/';
|
||||
if($this->getInput('b')){
|
||||
$uri.=$this->getInput('b');
|
||||
}else{
|
||||
$uri.='master';
|
||||
}
|
||||
$uri = $this->getInput('uri').'/'.$this->getInput('u').'/'
|
||||
.$this->getInput('p').'/commits/'.$this->getInput('b');
|
||||
|
||||
$html = $this->getSimpleHTMLDOM($uri)
|
||||
or $this->returnServerError('No results for Gitlab Commits of project '.$this->getInput('uri').'/'.$this->getInput('u').'/'.$this->getInput('p'));
|
||||
|
||||
or $this->returnServerError('No results for Gitlab Commits of project '.$uri);
|
||||
|
||||
foreach($html->find('li.commit') as $commit){
|
||||
|
||||
|
Reference in New Issue
Block a user