From 8e0d59f95da917969281c1aedee3af5aa98f9c45 Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Mon, 20 Feb 2017 20:20:41 +0700 Subject: [PATCH] Small fixes --- README.md | 4 ++-- src/Telegram.php | 12 +++--------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index e71e825..cec4c61 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a58c62e4bde1485f95b52fa56a2e4320)](https://www.codacy.com/app/LEXASOFT/PHP-Censor-Telegram-Plugin) # PHP-Censor-Telegram-Plugin -Telegram plugin for PHP Censor +Telegram plugin for [PHP Censor](https://github.com/corpsee/php-censor) # Installation First of all - `composer require lexasoft/php-censor-telegram-plugin` @@ -12,7 +12,7 @@ In the PHP Censor Project config section add the Telegram trigger complete: telegram: api_key: "" - message: [%ICON_BUILD%] [%PROJECT_TITLE%](%PROJECT_URI%) - [Build #%BUILD%](%BUILD_URI%) has finished for commit [%SHORT_COMMIT% (%COMMIT_EMAIL%)](%COMMIT_URI%) on branch [%BRANCH%](%BRANCH_URI%) + message: "[%ICON_BUILD%] [%PROJECT_TITLE%](%PROJECT_URI%) - [Build #%BUILD%](%BUILD_URI%) has finished for commit [%SHORT_COMMIT% (%COMMIT_EMAIL%)](%COMMIT_URI%) on branch [%BRANCH%](%BRANCH_URI%)" recipients: - - "-" diff --git a/src/Telegram.php b/src/Telegram.php index 2d74910..cb0af27 100644 --- a/src/Telegram.php +++ b/src/Telegram.php @@ -1,11 +1,4 @@ * @package PHPCensor * @subpackage Plugins @@ -121,9 +115,9 @@ private function buildMessage() $buildIcon = $this->build->isSuccessful() ? '✅' : '❎'; $buildLog = $this->build->getLog(); $buildLog = str_replace(['[0;32m', '[0;31m', '[0m', '/[0m'], '', $buildLog); - $buildmessages = explode('RUNNING PLUGIN: ', $buildLog); + $buildMessages = explode('RUNNING PLUGIN: ', $buildLog); - foreach ($buildmessages as $bm) { + foreach ($buildMessages as $bm) { $pos = mb_strpos($bm, "\n"); $firstRow = mb_substr($bm, 0, $pos);