Commit 027e79b7 authored by ManiacTwister's avatar ManiacTwister
Browse files

Fixed for newer gitlabs

parent 7caf3983
......@@ -14,16 +14,16 @@ class BuildMessage implements IrkerMessage
public function __construct($data, $colors=false)
{
$this->colors = $colors;
if(($this->project = $this->extractProjectName($data->repository->url)) == false)
if(($this->project = $this->extractProjectName($data->project->git_ssh_url)) == false)
{
$this->project = $data->repository->name;
$this->project = $data->project->name;
}
$this->username = $data->commit->author_name;
$this->sha = $this->getShortSha($data->commit->sha);
$this->status = $this->status($data->build_status);
$this->duration = $data->commit->duration;
$this->commitlink = $data->repository->homepage.'/commit/'.$data->commit->sha;
$this->buildlink = $data->repository->homepage.'/builds/'.$data->build_id;
$this->commitlink = $data->project->homepage.'/commit/'.$data->commit->sha;
$this->buildlink = $data->project->homepage.'/builds/'.$data->build_id;
}
private function status($status)
......
......@@ -14,9 +14,9 @@ class IssueMessage implements IrkerMessage
public function __construct($data, $colors=false)
{
$this->colors = $colors;
if(($this->project = $this->extractProjectName($data->repository->url)) == false)
if(($this->project = $this->extractProjectName($data->project->git_ssh_url)) == false)
{
$this->project = $data->repository->name;
$this->project = $data->project->name;
}
$this->username = $data->user->name;
......
......@@ -14,9 +14,9 @@ class MergeMessage implements IrkerMessage
public function __construct($data, $colors=false)
{
$this->colors = $colors;
if(($this->project = $this->extractProjectName($data->repository->url)) == false)
if(($this->project = $this->extractProjectName($data->project->git_ssh_url)) == false)
{
$this->project = $data->repository->name;
$this->project = $data->project->name;
}
$this->username = $data->user->name;
......
......@@ -16,9 +16,9 @@ class NoteMessage implements IrkerMessage
public function __construct($data, $colors=false)
{
$this->colors = $colors;
if(($this->project = $this->extractProjectName($data->repository->url)) == false)
if(($this->project = $this->extractProjectName($data->project->git_ssh_url)) == false)
{
$this->project = $data->repository->name;
$this->project = $data->project->name;
}
$this->username = $data->user->name;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment