From 697b3276b842dde495ae7a5769ecdcb4011c139b Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Thu, 23 Nov 2023 09:49:45 +0700 Subject: [PATCH 1/3] fix: update some events for gitlab --- config/jsons/gitlab-events.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/jsons/gitlab-events.json b/config/jsons/gitlab-events.json index 110684b..bd7f573 100644 --- a/config/jsons/gitlab-events.json +++ b/config/jsons/gitlab-events.json @@ -32,6 +32,7 @@ "feature_flag": false, "release": { "create": true, - "update": false + "update": false, + "delete": true } } From fb610bba0cf08f3fee378578dbd541515c5a4c4d Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Sat, 3 Feb 2024 01:02:13 +0700 Subject: [PATCH 2/3] remove redundant script in composer --- composer.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 5ee01f7..c12583a 100644 --- a/composer.json +++ b/composer.json @@ -53,13 +53,7 @@ "scripts": { "analyse": "vendor/bin/phpstan", "format": "vendor/bin/php-cs-fixer fix --allow-risky=yes", - "test": "vendor/bin/pest", - "post-install-cmd": [ - "bash ./install.sh" - ], - "post-update-cmd": [ - "bash ./install.sh" - ] + "test": "vendor/bin/pest" }, "support": { "issues": "https://github.com/cslant/telegram-git-notifier/issues" From dd7bac5390e5d34564815a9de9434fe6a0807a82 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Sat, 3 Feb 2024 01:04:40 +0700 Subject: [PATCH 3/3] :+1: update implement interfaces --- src/Bot.php | 5 +---- src/Interfaces/BotInterface.php | 3 ++- src/Interfaces/Structures/NotificationInterface.php | 2 +- src/Notifier.php | 3 +-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Bot.php b/src/Bot.php index 1430503..cfd5f1b 100644 --- a/src/Bot.php +++ b/src/Bot.php @@ -5,9 +5,6 @@ use CSlant\TelegramGitNotifier\Constants\EventConstant; use CSlant\TelegramGitNotifier\Exceptions\ConfigFileException; use CSlant\TelegramGitNotifier\Interfaces\BotInterface; -use CSlant\TelegramGitNotifier\Interfaces\EventInterface; -use CSlant\TelegramGitNotifier\Interfaces\SettingInterface; -use CSlant\TelegramGitNotifier\Interfaces\Structures\AppInterface; use CSlant\TelegramGitNotifier\Models\Event; use CSlant\TelegramGitNotifier\Models\Setting; use CSlant\TelegramGitNotifier\Structures\App; @@ -17,7 +14,7 @@ use CSlant\TelegramGitNotifier\Trait\EventTrait; use Telegram; -class Bot implements AppInterface, BotInterface, EventInterface, SettingInterface +class Bot implements BotInterface { use App; use TelegramBot; diff --git a/src/Interfaces/BotInterface.php b/src/Interfaces/BotInterface.php index 165d703..a65e163 100644 --- a/src/Interfaces/BotInterface.php +++ b/src/Interfaces/BotInterface.php @@ -4,8 +4,9 @@ use CSlant\TelegramGitNotifier\Exceptions\ConfigFileException; use CSlant\TelegramGitNotifier\Exceptions\MessageIsEmptyException; +use CSlant\TelegramGitNotifier\Interfaces\Structures\AppInterface; -interface BotInterface +interface BotInterface extends AppInterface, EventInterface, SettingInterface { /** * Set the menu button for a telegram diff --git a/src/Interfaces/Structures/NotificationInterface.php b/src/Interfaces/Structures/NotificationInterface.php index 56147b5..a68457b 100644 --- a/src/Interfaces/Structures/NotificationInterface.php +++ b/src/Interfaces/Structures/NotificationInterface.php @@ -7,7 +7,7 @@ use CSlant\TelegramGitNotifier\Exceptions\SendNotificationException; use Symfony\Component\HttpFoundation\Request; -interface NotificationInterface +interface NotificationInterface extends AppInterface { /** * Notify access denied to other chat ids diff --git a/src/Notifier.php b/src/Notifier.php index d557078..62fbd08 100644 --- a/src/Notifier.php +++ b/src/Notifier.php @@ -6,7 +6,6 @@ use CSlant\TelegramGitNotifier\Constants\NotificationConstant; use CSlant\TelegramGitNotifier\Exceptions\ConfigFileException; use CSlant\TelegramGitNotifier\Interfaces\EventInterface; -use CSlant\TelegramGitNotifier\Interfaces\Structures\AppInterface; use CSlant\TelegramGitNotifier\Interfaces\Structures\NotificationInterface; use CSlant\TelegramGitNotifier\Models\Event; use CSlant\TelegramGitNotifier\Structures\App; @@ -15,7 +14,7 @@ use GuzzleHttp\Client; use Telegram; -class Notifier implements AppInterface, NotificationInterface, EventInterface +class Notifier implements NotificationInterface, EventInterface { use App; use Notification;