sendStatusPostback fix.

This commit is contained in:
Dmitry Khomutov 2017-07-02 16:45:25 +07:00
parent 55a4444e89
commit a9309a1feb
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9
3 changed files with 14 additions and 8 deletions

View file

@ -743,7 +743,7 @@ class Build extends Model
*/
public function sendStatusPostback()
{
return;
return false;
}
/**

View file

@ -45,16 +45,19 @@ class GithubBuild extends RemoteGitBuild
*/
public function sendStatusPostback()
{
if ('Manual' === $this->getCommitId()) {
return false;
}
$project = $this->getProject();
if (empty($project)) {
return false;
}
$token = Config::getInstance()->get('php-censor.github.token');
if (empty($token) || empty($this->data['id'])) {
return;
}
$project = $this->getProject();
if (empty($project)) {
return;
return false;
}
switch ($this->getStatus()) {
@ -93,6 +96,8 @@ class GithubBuild extends RemoteGitBuild
'context' => 'PHP Censor',
]
]);
return true;
}
/**

View file

@ -93,6 +93,7 @@ class BuildService
$build->setExtraValues($extra);
}
/** @var Build $build */
$build = $this->buildStore->save($build);
$buildId = $build->getId();