Skip to content

Commit 98065d5

Browse files
committed
Version 0.3.0
1 parent a0f1e14 commit 98065d5

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

CHANGELOG.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,21 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
55

66
## [Unreleased]
77
### Added
8-
- Code checkers to ensure coding standard.
9-
- When releasing a new version of the Support Bot, automatically fetch the latest code and install with composer.
10-
- MySQL cache for GitHub client.
118
### Changed
12-
- Bumped Manager to 1.5.
13-
- Logging is now decoupled with custom Monolog logger.
149
### Deprecated
1510
### Removed
1611
### Fixed
1712
### Security
1813

14+
## [0.3.0] - 2019-07-30
15+
### Added
16+
- Code checkers to ensure coding standard. (#30)
17+
- When releasing a new version of the Support Bot, automatically fetch the latest code and install with composer. (#31)
18+
- MySQL cache for GitHub client. (#32)
19+
### Changed
20+
- Bumped Manager to 1.5. (#27)
21+
- Logging is now decoupled with custom Monolog logger. (#28, #29)
22+
1923
## [0.2.0] - 2019-06-01
2024
### Changed
2125
- Bumped Manager to 1.4
@@ -31,4 +35,5 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
3135
- Extended `.env.example` file.
3236

3337
[Unreleased]: https://github.com/php-telegram-bot/support-bot/compare/master...develop
38+
[0.3.0]: https://github.com/php-telegram-bot/support-bot/compare/0.2.0...0.3.0
3439
[0.2.0]: https://github.com/php-telegram-bot/support-bot/compare/0.1.0...0.2.0

public/manager.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace TelegramBot\SupportBot;
1212

1313
use Dotenv\Dotenv;
14+
use Exception;
1415
use Longman\TelegramBot\Exception\TelegramLogException;
1516
use Longman\TelegramBot\TelegramLog;
1617
use Monolog\Formatter\LineFormatter;
@@ -66,6 +67,7 @@
6667
/**
6768
* Initialise the logging.
6869
*
70+
* @throws Exception
6971
*/
7072
function initLogging(): void
7173
{

public/webhooks/github.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
if ($webhook->getEvent() === 'release') {
5959
handleRelease($data);
6060

61-
if ($repo === 'php-telegram-bot/support-bot' && getenv('TG_AUTOUPDATE') === '1') {
61+
if ($repo['full_name'] === 'php-telegram-bot/support-bot' && getenv('TG_AUTOUPDATE') === '1') {
6262
pullLatestAndUpdate();
6363
}
6464
}
@@ -106,7 +106,8 @@ function parseReleaseBody($body, $user, $repo): string
106106
{
107107
// Replace headers with bold text.
108108
$body = preg_replace_callback('~### (?<header>.*)~', static function ($matches) {
109-
return "*{$matches['header']}*";
109+
$header = trim($matches['header']);
110+
return "*{$header}*";
110111
}, $body);
111112

112113
$github_client = new Client();

0 commit comments

Comments
 (0)