Fixed naming in plugins (phpci -> builder)

This commit is contained in:
Dmitry Khomutov 2016-07-22 13:05:34 +06:00
commit 7ec29f1f31
43 changed files with 330 additions and 376 deletions

View file

@ -29,9 +29,9 @@ class Deployer extends Plugin
/**
* {@inheritdoc}
*/
public function __construct(Builder $phpci, Build $build, array $options = [])
public function __construct(Builder $builder, Build $build, array $options = [])
{
parent::__construct($phpci, $build, $options);
parent::__construct($builder, $build, $options);
$this->reason = 'PHP Censor Build #%BUILD% - %COMMIT_MESSAGE%';
if (isset($options['webhook_url'])) {
@ -51,17 +51,17 @@ class Deployer extends Plugin
public function execute()
{
if (empty($this->webhookUrl)) {
$this->phpci->logFailure('You must specify a webhook URL.');
$this->builder->logFailure('You must specify a webhook URL.');
return false;
}
$http = new HttpClient();
$response = $http->post($this->webhookUrl, [
'reason' => $this->phpci->interpolate($this->reason),
'reason' => $this->builder->interpolate($this->reason),
'source' => 'PHP Censor',
'url' => $this->phpci->interpolate('%BUILD_URI%'),
'branch' => $this->phpci->interpolate('%BRANCH%'),
'url' => $this->builder->interpolate('%BUILD_URI%'),
'branch' => $this->builder->interpolate('%BRANCH%'),
'update_only' => $this->updateOnly
]);