sendStatusPostback fix.
This commit is contained in:
parent
55a4444e89
commit
a9309a1feb
|
@ -743,7 +743,7 @@ class Build extends Model
|
|||
*/
|
||||
public function sendStatusPostback()
|
||||
{
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -93,6 +93,7 @@ class BuildService
|
|||
$build->setExtraValues($extra);
|
||||
}
|
||||
|
||||
/** @var Build $build */
|
||||
$build = $this->buildStore->save($build);
|
||||
|
||||
$buildId = $build->getId();
|
||||
|
|
Loading…
Reference in a new issue