From 650ece6a9bdd2e3d1a158dfa4e56f4b986da1679 Mon Sep 17 00:00:00 2001 From: Tan Nguyen <tannp27@gmail.com> Date: Fri, 3 Nov 2023 02:47:25 +0700 Subject: [PATCH 1/3] refactor: Update namespace from LbilTech to CSlant - Changed primary namespace from "LbilTech\\TelegramGitNotifier" to "CSlant\\TelegramGitNotifier". - Updated all relevant import 'use' statements throughout the source code to reflect this namespace change. - Checked and ensured that all functionalities remain intact post-refactor. This namespace change aligns with our recent branding changes and provides a more consistent codebase. --- README.md | 14 +++++----- common/helpers.php | 2 +- composer.json | 12 ++++---- config/tg-notifier.php | 4 +-- src/Bot.php | 28 +++++++++---------- src/Constants/EventConstant.php | 2 +- src/Constants/NotificationConstant.php | 2 +- src/Constants/SettingConstant.php | 2 +- src/Exceptions/CallbackException.php | 2 +- src/Exceptions/EntryNotFoundException.php | 2 +- .../InvalidViewTemplateException.php | 2 +- src/Exceptions/MessageIsEmptyException.php | 2 +- src/Exceptions/SendNotificationException.php | 2 +- .../TelegramGitNotifierException.php | 2 +- src/Helpers/ConfigHelper.php | 6 ++-- src/Interfaces/BotInterface.php | 4 +-- src/Interfaces/EventInterface.php | 6 ++-- src/Interfaces/SettingInterface.php | 12 ++++---- src/Interfaces/Structures/AppInterface.php | 6 ++-- .../Structures/NotificationInterface.php | 8 +++--- src/Interfaces/WebhookInterface.php | 2 +- src/Models/Event.php | 4 +-- src/Models/Setting.php | 4 +-- src/Notifier.php | 20 ++++++------- src/Objects/Validator.php | 8 +++--- src/Structures/App.php | 6 ++-- src/Structures/Notification.php | 8 +++--- src/Structures/TelegramBot.php | 2 +- src/Trait/ActionEventTrait.php | 2 +- src/Trait/BotSettingTrait.php | 4 +-- src/Trait/EventSettingTrait.php | 6 ++-- src/Trait/EventTrait.php | 4 +-- src/Webhook.php | 4 +-- tests/ConfigTest.php | 2 +- tests/NotifierTest.php | 2 +- tests/ValidatorTest.php | 4 +-- 36 files changed, 101 insertions(+), 101 deletions(-) diff --git a/README.md b/README.md index 8dd6de8..f27e9a3 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,15 @@ you can create a Telegram bot to receive notifications from GitHub or GitLab eve and manage customization through messages and buttons on Telegram. <p align="center"> - <img alt="Telegram git notifier core" src="https://github.com/lbiltech/telegram-git-notifier/assets/35853002/193e523b-4654-4f61-aaf4-5b6d106b67e3" /> + <img alt="Telegram git notifier core" src="https://github.com/cslant/telegram-git-notifier/assets/35853002/193e523b-4654-4f61-aaf4-5b6d106b67e3" /> </p> -![License](https://img.shields.io/github/license/lbiltech/telegram-git-notifier.svg?style=flat-square) -[![Latest Version on Packagist](https://img.shields.io/packagist/v/lbiltech/telegram-git-notifier.svg?style=flat-square)](https://packagist.org/lbiltech/telegram-git-notifier) -[![Total Downloads](https://img.shields.io/packagist/dt/lbiltech/telegram-git-notifier.svg?style=flat-square)](https://packagist.org/packages/lbiltech/telegram-git-notifier) +![License](https://img.shields.io/github/license/cslant/telegram-git-notifier.svg?style=flat-square) +[![Latest Version on Packagist](https://img.shields.io/packagist/v/cslant/telegram-git-notifier.svg?style=flat-square)](https://packagist.org/cslant/telegram-git-notifier) +[![Total Downloads](https://img.shields.io/packagist/dt/cslant/telegram-git-notifier.svg?style=flat-square)](https://packagist.org/packages/cslant/telegram-git-notifier) [![StyleCI](https://styleci.io/repos/683908657/shield)](https://styleci.io/repos/683908657) -[![Quality Score](https://img.shields.io/scrutinizer/g/lbiltech/telegram-git-notifier.svg?style=flat-square)](https://scrutinizer-ci.com/g/lbiltech/telegram-git-notifier) -[![Maintainability](https://api.codeclimate.com/v1/badges/b6f16164d55809d0918e/maintainability)](https://codeclimate.com/github/lbiltech/telegram-git-notifier/maintainability) +[![Quality Score](https://img.shields.io/scrutinizer/g/cslant/telegram-git-notifier.svg?style=flat-square)](https://scrutinizer-ci.com/g/cslant/telegram-git-notifier) +[![Maintainability](https://api.codeclimate.com/v1/badges/b6f16164d55809d0918e/maintainability)](https://codeclimate.com/github/cslant/telegram-git-notifier/maintainability) ## ๐ Requirements @@ -27,7 +27,7 @@ and manage customization through messages and buttons on Telegram. You can install this package via Composer: ```bash -composer require lbiltech/telegram-git-notifier +composer require cslant/telegram-git-notifier ``` ## ๐งช Testing diff --git a/common/helpers.php b/common/helpers.php index ba9a497..64a9e08 100755 --- a/common/helpers.php +++ b/common/helpers.php @@ -1,6 +1,6 @@ <?php -use LbilTech\TelegramGitNotifier\Helpers\ConfigHelper; +use CSlant\TelegramGitNotifier\Helpers\ConfigHelper; if (!function_exists('tgn_singularity')) { /** diff --git a/composer.json b/composer.json index fccc4e0..5ee01f7 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { - "name": "lbiltech/telegram-git-notifier", + "name": "cslant/telegram-git-notifier", "description": "Send notification from Gitlab and Github events to Telegram", "keywords": [ - "lbiltech", + "cslant", "telegram-bot", "notify", "git-webhook", @@ -15,7 +15,7 @@ "telegram-bot-github-notify", "telegram-bot-gitlab-notify" ], - "homepage": "https://github.com/lbiltech/telegram-git-notifier", + "homepage": "https://github.com/cslant/telegram-git-notifier", "license": "MIT", "authors": [ { @@ -27,7 +27,7 @@ ], "autoload": { "psr-4": { - "LbilTech\\TelegramGitNotifier\\": "src/" + "CSlant\\TelegramGitNotifier\\": "src/" }, "files": [ "common/helpers.php" @@ -35,7 +35,7 @@ }, "autoload-dev": { "psr-4": { - "LbilTech\\TelegramGitNotifier\\Tests\\": "tests" + "CSlant\\TelegramGitNotifier\\Tests\\": "tests" } }, "require": { @@ -62,7 +62,7 @@ ] }, "support": { - "issues": "https://github.com/lbiltech/telegram-git-notifier/issues" + "issues": "https://github.com/cslant/telegram-git-notifier/issues" }, "config": { "sort-packages": true, diff --git a/config/tg-notifier.php b/config/tg-notifier.php index 9127043..b762afd 100644 --- a/config/tg-notifier.php +++ b/config/tg-notifier.php @@ -32,9 +32,9 @@ 'author' => [ 'discussion' => $_ENV['TGN_AUTHOR_DISCUSSION'] ?? - 'https://github.com/lbiltech/telegram-git-notifier/discussions', + 'https://github.com/cslant/telegram-git-notifier/discussions', 'source_code' => $_ENV['TGN_AUTHOR_SOURCE_CODE'] ?? - 'https://github.com/lbiltech/telegram-git-notifier', + 'https://github.com/cslant/telegram-git-notifier', ], /** Set the path to the data file */ diff --git a/src/Bot.php b/src/Bot.php index 1a23041..63eb059 100644 --- a/src/Bot.php +++ b/src/Bot.php @@ -1,19 +1,19 @@ <?php -namespace LbilTech\TelegramGitNotifier; - -use LbilTech\TelegramGitNotifier\Constants\EventConstant; -use LbilTech\TelegramGitNotifier\Interfaces\BotInterface; -use LbilTech\TelegramGitNotifier\Interfaces\EventInterface; -use LbilTech\TelegramGitNotifier\Interfaces\SettingInterface; -use LbilTech\TelegramGitNotifier\Interfaces\Structures\AppInterface; -use LbilTech\TelegramGitNotifier\Models\Event; -use LbilTech\TelegramGitNotifier\Models\Setting; -use LbilTech\TelegramGitNotifier\Structures\App; -use LbilTech\TelegramGitNotifier\Structures\TelegramBot; -use LbilTech\TelegramGitNotifier\Trait\BotSettingTrait; -use LbilTech\TelegramGitNotifier\Trait\EventSettingTrait; -use LbilTech\TelegramGitNotifier\Trait\EventTrait; +namespace CSlant\TelegramGitNotifier; + +use CSlant\TelegramGitNotifier\Constants\EventConstant; +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; +use CSlant\TelegramGitNotifier\Structures\TelegramBot; +use CSlant\TelegramGitNotifier\Trait\BotSettingTrait; +use CSlant\TelegramGitNotifier\Trait\EventSettingTrait; +use CSlant\TelegramGitNotifier\Trait\EventTrait; use Telegram; class Bot implements AppInterface, BotInterface, EventInterface, SettingInterface diff --git a/src/Constants/EventConstant.php b/src/Constants/EventConstant.php index 94a54a2..e054688 100644 --- a/src/Constants/EventConstant.php +++ b/src/Constants/EventConstant.php @@ -1,6 +1,6 @@ <?php -namespace LbilTech\TelegramGitNotifier\Constants; +namespace CSlant\TelegramGitNotifier\Constants; final class EventConstant { diff --git a/src/Constants/NotificationConstant.php b/src/Constants/NotificationConstant.php index 27d6df5..87983a1 100644 --- a/src/Constants/NotificationConstant.php +++ b/src/Constants/NotificationConstant.php @@ -1,6 +1,6 @@ <?php -namespace LbilTech\TelegramGitNotifier\Constants; +namespace CSlant\TelegramGitNotifier\Constants; final class NotificationConstant { diff --git a/src/Constants/SettingConstant.php b/src/Constants/SettingConstant.php index 4b5e4a3..4bcaf65 100644 --- a/src/Constants/SettingConstant.php +++ b/src/Constants/SettingConstant.php @@ -1,6 +1,6 @@ <?php -namespace LbilTech\TelegramGitNotifier\Constants; +namespace CSlant\TelegramGitNotifier\Constants; final class SettingConstant { diff --git a/src/Exceptions/CallbackException.php b/src/Exceptions/CallbackException.php index f709bd4..304ae7c 100644 --- a/src/Exceptions/CallbackException.php +++ b/src/Exceptions/CallbackException.php @@ -1,6 +1,6 @@ <?php -namespace LbilTech\TelegramGitNotifier\Exceptions; +namespace CSlant\TelegramGitNotifier\Exceptions; final class CallbackException extends TelegramGitNotifierException { diff --git a/src/Exceptions/EntryNotFoundException.php b/src/Exceptions/EntryNotFoundException.php index 04b3bf6..03bb8b9 100644 --- a/src/Exceptions/EntryNotFoundException.php +++ b/src/Exceptions/EntryNotFoundException.php @@ -1,6 +1,6 @@ <?php -namespace LbilTech\TelegramGitNotifier\Exceptions; +namespace CSlant\TelegramGitNotifier\Exceptions; final class EntryNotFoundException extends TelegramGitNotifierException { diff --git a/src/Exceptions/InvalidViewTemplateException.php b/src/Exceptions/InvalidViewTemplateException.php index 0acddc2..070adf7 100644 --- a/src/Exceptions/InvalidViewTemplateException.php +++ b/src/Exceptions/InvalidViewTemplateException.php @@ -1,6 +1,6 @@ <?php -namespace LbilTech\TelegramGitNotifier\Exceptions; +namespace CSlant\TelegramGitNotifier\Exceptions; use Throwable; diff --git a/src/Exceptions/MessageIsEmptyException.php b/src/Exceptions/MessageIsEmptyException.php index 75d8cd6..ada095a 100644 --- a/src/Exceptions/MessageIsEmptyException.php +++ b/src/Exceptions/MessageIsEmptyException.php @@ -1,6 +1,6 @@ <?php -namespace LbilTech\TelegramGitNotifier\Exceptions; +namespace CSlant\TelegramGitNotifier\Exceptions; final class MessageIsEmptyException extends TelegramGitNotifierException { diff --git a/src/Exceptions/SendNotificationException.php b/src/Exceptions/SendNotificationException.php index 55a6b9a..db3f356 100644 --- a/src/Exceptions/SendNotificationException.php +++ b/src/Exceptions/SendNotificationException.php @@ -1,6 +1,6 @@ <?php -namespace LbilTech\TelegramGitNotifier\Exceptions; +namespace CSlant\TelegramGitNotifier\Exceptions; final class SendNotificationException extends TelegramGitNotifierException { diff --git a/src/Exceptions/TelegramGitNotifierException.php b/src/Exceptions/TelegramGitNotifierException.php index 3d201ea..2dc4279 100644 --- a/src/Exceptions/TelegramGitNotifierException.php +++ b/src/Exceptions/TelegramGitNotifierException.php @@ -1,6 +1,6 @@ <?php -namespace LbilTech\TelegramGitNotifier\Exceptions; +namespace CSlant\TelegramGitNotifier\Exceptions; use Exception; diff --git a/src/Helpers/ConfigHelper.php b/src/Helpers/ConfigHelper.php index 2da04a4..a76357a 100644 --- a/src/Helpers/ConfigHelper.php +++ b/src/Helpers/ConfigHelper.php @@ -1,9 +1,9 @@ <?php -namespace LbilTech\TelegramGitNotifier\Helpers; +namespace CSlant\TelegramGitNotifier\Helpers; -use LbilTech\TelegramGitNotifier\Exceptions\EntryNotFoundException; -use LbilTech\TelegramGitNotifier\Exceptions\InvalidViewTemplateException; +use CSlant\TelegramGitNotifier\Exceptions\EntryNotFoundException; +use CSlant\TelegramGitNotifier\Exceptions\InvalidViewTemplateException; use Throwable; class ConfigHelper diff --git a/src/Interfaces/BotInterface.php b/src/Interfaces/BotInterface.php index 8f9091d..d72e911 100644 --- a/src/Interfaces/BotInterface.php +++ b/src/Interfaces/BotInterface.php @@ -1,8 +1,8 @@ <?php -namespace LbilTech\TelegramGitNotifier\Interfaces; +namespace CSlant\TelegramGitNotifier\Interfaces; -use LbilTech\TelegramGitNotifier\Exceptions\MessageIsEmptyException; +use CSlant\TelegramGitNotifier\Exceptions\MessageIsEmptyException; interface BotInterface { diff --git a/src/Interfaces/EventInterface.php b/src/Interfaces/EventInterface.php index a2de979..86a6465 100644 --- a/src/Interfaces/EventInterface.php +++ b/src/Interfaces/EventInterface.php @@ -1,9 +1,9 @@ <?php -namespace LbilTech\TelegramGitNotifier\Interfaces; +namespace CSlant\TelegramGitNotifier\Interfaces; -use LbilTech\TelegramGitNotifier\Constants\EventConstant; -use LbilTech\TelegramGitNotifier\Trait\ActionEventTrait; +use CSlant\TelegramGitNotifier\Constants\EventConstant; +use CSlant\TelegramGitNotifier\Trait\ActionEventTrait; use Symfony\Component\HttpFoundation\Request; interface EventInterface diff --git a/src/Interfaces/SettingInterface.php b/src/Interfaces/SettingInterface.php index e7cfaef..bfd94f2 100644 --- a/src/Interfaces/SettingInterface.php +++ b/src/Interfaces/SettingInterface.php @@ -1,12 +1,12 @@ <?php -namespace LbilTech\TelegramGitNotifier\Interfaces; +namespace CSlant\TelegramGitNotifier\Interfaces; -use LbilTech\TelegramGitNotifier\Constants\EventConstant; -use LbilTech\TelegramGitNotifier\Exceptions\InvalidViewTemplateException; -use LbilTech\TelegramGitNotifier\Exceptions\MessageIsEmptyException; -use LbilTech\TelegramGitNotifier\Trait\BotSettingTrait; -use LbilTech\TelegramGitNotifier\Trait\EventSettingTrait; +use CSlant\TelegramGitNotifier\Constants\EventConstant; +use CSlant\TelegramGitNotifier\Exceptions\InvalidViewTemplateException; +use CSlant\TelegramGitNotifier\Exceptions\MessageIsEmptyException; +use CSlant\TelegramGitNotifier\Trait\BotSettingTrait; +use CSlant\TelegramGitNotifier\Trait\EventSettingTrait; interface SettingInterface { diff --git a/src/Interfaces/Structures/AppInterface.php b/src/Interfaces/Structures/AppInterface.php index 2bc4867..9713e62 100644 --- a/src/Interfaces/Structures/AppInterface.php +++ b/src/Interfaces/Structures/AppInterface.php @@ -1,9 +1,9 @@ <?php -namespace LbilTech\TelegramGitNotifier\Interfaces\Structures; +namespace CSlant\TelegramGitNotifier\Interfaces\Structures; -use LbilTech\TelegramGitNotifier\Exceptions\EntryNotFoundException; -use LbilTech\TelegramGitNotifier\Exceptions\MessageIsEmptyException; +use CSlant\TelegramGitNotifier\Exceptions\EntryNotFoundException; +use CSlant\TelegramGitNotifier\Exceptions\MessageIsEmptyException; interface AppInterface { diff --git a/src/Interfaces/Structures/NotificationInterface.php b/src/Interfaces/Structures/NotificationInterface.php index 96ca9b2..56147b5 100644 --- a/src/Interfaces/Structures/NotificationInterface.php +++ b/src/Interfaces/Structures/NotificationInterface.php @@ -1,10 +1,10 @@ <?php -namespace LbilTech\TelegramGitNotifier\Interfaces\Structures; +namespace CSlant\TelegramGitNotifier\Interfaces\Structures; -use LbilTech\TelegramGitNotifier\Exceptions\InvalidViewTemplateException; -use LbilTech\TelegramGitNotifier\Exceptions\MessageIsEmptyException; -use LbilTech\TelegramGitNotifier\Exceptions\SendNotificationException; +use CSlant\TelegramGitNotifier\Exceptions\InvalidViewTemplateException; +use CSlant\TelegramGitNotifier\Exceptions\MessageIsEmptyException; +use CSlant\TelegramGitNotifier\Exceptions\SendNotificationException; use Symfony\Component\HttpFoundation\Request; interface NotificationInterface diff --git a/src/Interfaces/WebhookInterface.php b/src/Interfaces/WebhookInterface.php index d63e853..3ec8582 100644 --- a/src/Interfaces/WebhookInterface.php +++ b/src/Interfaces/WebhookInterface.php @@ -1,6 +1,6 @@ <?php -namespace LbilTech\TelegramGitNotifier\Interfaces; +namespace CSlant\TelegramGitNotifier\Interfaces; interface WebhookInterface { diff --git a/src/Models/Event.php b/src/Models/Event.php index d3a12b2..4896b4c 100644 --- a/src/Models/Event.php +++ b/src/Models/Event.php @@ -1,8 +1,8 @@ <?php -namespace LbilTech\TelegramGitNotifier\Models; +namespace CSlant\TelegramGitNotifier\Models; -use LbilTech\TelegramGitNotifier\Constants\EventConstant; +use CSlant\TelegramGitNotifier\Constants\EventConstant; class Event { diff --git a/src/Models/Setting.php b/src/Models/Setting.php index f7b6d8c..6341143 100644 --- a/src/Models/Setting.php +++ b/src/Models/Setting.php @@ -1,8 +1,8 @@ <?php -namespace LbilTech\TelegramGitNotifier\Models; +namespace CSlant\TelegramGitNotifier\Models; -use LbilTech\TelegramGitNotifier\Constants\SettingConstant; +use CSlant\TelegramGitNotifier\Constants\SettingConstant; class Setting { diff --git a/src/Notifier.php b/src/Notifier.php index 7bb7490..4644f99 100644 --- a/src/Notifier.php +++ b/src/Notifier.php @@ -1,17 +1,17 @@ <?php -namespace LbilTech\TelegramGitNotifier; +namespace CSlant\TelegramGitNotifier; use GuzzleHttp\Client; -use LbilTech\TelegramGitNotifier\Constants\EventConstant; -use LbilTech\TelegramGitNotifier\Constants\NotificationConstant; -use LbilTech\TelegramGitNotifier\Interfaces\EventInterface; -use LbilTech\TelegramGitNotifier\Interfaces\Structures\AppInterface; -use LbilTech\TelegramGitNotifier\Interfaces\Structures\NotificationInterface; -use LbilTech\TelegramGitNotifier\Models\Event; -use LbilTech\TelegramGitNotifier\Structures\App; -use LbilTech\TelegramGitNotifier\Structures\Notification; -use LbilTech\TelegramGitNotifier\Trait\EventTrait; +use CSlant\TelegramGitNotifier\Constants\EventConstant; +use CSlant\TelegramGitNotifier\Constants\NotificationConstant; +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; +use CSlant\TelegramGitNotifier\Structures\Notification; +use CSlant\TelegramGitNotifier\Trait\EventTrait; use Telegram; class Notifier implements AppInterface, NotificationInterface, EventInterface diff --git a/src/Objects/Validator.php b/src/Objects/Validator.php index 5562f4c..bb7d9fd 100644 --- a/src/Objects/Validator.php +++ b/src/Objects/Validator.php @@ -1,10 +1,10 @@ <?php -namespace LbilTech\TelegramGitNotifier\Objects; +namespace CSlant\TelegramGitNotifier\Objects; -use LbilTech\TelegramGitNotifier\Models\Event; -use LbilTech\TelegramGitNotifier\Models\Setting; -use LbilTech\TelegramGitNotifier\Trait\ActionEventTrait; +use CSlant\TelegramGitNotifier\Models\Event; +use CSlant\TelegramGitNotifier\Models\Setting; +use CSlant\TelegramGitNotifier\Trait\ActionEventTrait; class Validator { diff --git a/src/Structures/App.php b/src/Structures/App.php index 17972e5..e6836f8 100644 --- a/src/Structures/App.php +++ b/src/Structures/App.php @@ -1,10 +1,10 @@ <?php -namespace LbilTech\TelegramGitNotifier\Structures; +namespace CSlant\TelegramGitNotifier\Structures; use Exception; -use LbilTech\TelegramGitNotifier\Exceptions\EntryNotFoundException; -use LbilTech\TelegramGitNotifier\Exceptions\MessageIsEmptyException; +use CSlant\TelegramGitNotifier\Exceptions\EntryNotFoundException; +use CSlant\TelegramGitNotifier\Exceptions\MessageIsEmptyException; use Telegram; trait App diff --git a/src/Structures/Notification.php b/src/Structures/Notification.php index d8ec7f1..261b0fa 100644 --- a/src/Structures/Notification.php +++ b/src/Structures/Notification.php @@ -1,11 +1,11 @@ <?php -namespace LbilTech\TelegramGitNotifier\Structures; +namespace CSlant\TelegramGitNotifier\Structures; use GuzzleHttp\Exception\GuzzleException; -use LbilTech\TelegramGitNotifier\Constants\EventConstant; -use LbilTech\TelegramGitNotifier\Exceptions\MessageIsEmptyException; -use LbilTech\TelegramGitNotifier\Exceptions\SendNotificationException; +use CSlant\TelegramGitNotifier\Constants\EventConstant; +use CSlant\TelegramGitNotifier\Exceptions\MessageIsEmptyException; +use CSlant\TelegramGitNotifier\Exceptions\SendNotificationException; use Symfony\Component\HttpFoundation\Request; trait Notification diff --git a/src/Structures/TelegramBot.php b/src/Structures/TelegramBot.php index af865dd..f2e0df9 100644 --- a/src/Structures/TelegramBot.php +++ b/src/Structures/TelegramBot.php @@ -1,6 +1,6 @@ <?php -namespace LbilTech\TelegramGitNotifier\Structures; +namespace CSlant\TelegramGitNotifier\Structures; use Telegram; diff --git a/src/Trait/ActionEventTrait.php b/src/Trait/ActionEventTrait.php index 5161e0a..9b1e6ac 100644 --- a/src/Trait/ActionEventTrait.php +++ b/src/Trait/ActionEventTrait.php @@ -1,6 +1,6 @@ <?php -namespace LbilTech\TelegramGitNotifier\Trait; +namespace CSlant\TelegramGitNotifier\Trait; trait ActionEventTrait { diff --git a/src/Trait/BotSettingTrait.php b/src/Trait/BotSettingTrait.php index 6524d4c..c52941e 100644 --- a/src/Trait/BotSettingTrait.php +++ b/src/Trait/BotSettingTrait.php @@ -1,8 +1,8 @@ <?php -namespace LbilTech\TelegramGitNotifier\Trait; +namespace CSlant\TelegramGitNotifier\Trait; -use LbilTech\TelegramGitNotifier\Constants\SettingConstant; +use CSlant\TelegramGitNotifier\Constants\SettingConstant; trait BotSettingTrait { diff --git a/src/Trait/EventSettingTrait.php b/src/Trait/EventSettingTrait.php index ea84a9a..3519d7c 100644 --- a/src/Trait/EventSettingTrait.php +++ b/src/Trait/EventSettingTrait.php @@ -1,9 +1,9 @@ <?php -namespace LbilTech\TelegramGitNotifier\Trait; +namespace CSlant\TelegramGitNotifier\Trait; -use LbilTech\TelegramGitNotifier\Constants\EventConstant; -use LbilTech\TelegramGitNotifier\Constants\SettingConstant; +use CSlant\TelegramGitNotifier\Constants\EventConstant; +use CSlant\TelegramGitNotifier\Constants\SettingConstant; trait EventSettingTrait { diff --git a/src/Trait/EventTrait.php b/src/Trait/EventTrait.php index 1156ea3..049431c 100644 --- a/src/Trait/EventTrait.php +++ b/src/Trait/EventTrait.php @@ -1,8 +1,8 @@ <?php -namespace LbilTech\TelegramGitNotifier\Trait; +namespace CSlant\TelegramGitNotifier\Trait; -use LbilTech\TelegramGitNotifier\Constants\EventConstant; +use CSlant\TelegramGitNotifier\Constants\EventConstant; use Symfony\Component\HttpFoundation\Request; trait EventTrait diff --git a/src/Webhook.php b/src/Webhook.php index 1fa81a1..90725ef 100644 --- a/src/Webhook.php +++ b/src/Webhook.php @@ -1,8 +1,8 @@ <?php -namespace LbilTech\TelegramGitNotifier; +namespace CSlant\TelegramGitNotifier; -use LbilTech\TelegramGitNotifier\Interfaces\WebhookInterface; +use CSlant\TelegramGitNotifier\Interfaces\WebhookInterface; class Webhook implements WebhookInterface { diff --git a/tests/ConfigTest.php b/tests/ConfigTest.php index 38fa920..ef343ca 100644 --- a/tests/ConfigTest.php +++ b/tests/ConfigTest.php @@ -1,6 +1,6 @@ <?php -use LbilTech\TelegramGitNotifier\Bot; +use CSlant\TelegramGitNotifier\Bot; beforeEach(function () { $this->bot = new Bot(); diff --git a/tests/NotifierTest.php b/tests/NotifierTest.php index a61c320..cfeb682 100644 --- a/tests/NotifierTest.php +++ b/tests/NotifierTest.php @@ -1,6 +1,6 @@ <?php -use LbilTech\TelegramGitNotifier\Notifier; +use CSlant\TelegramGitNotifier\Notifier; beforeEach(function () { $this->nofitier = new Notifier(); diff --git a/tests/ValidatorTest.php b/tests/ValidatorTest.php index 2eed1e5..02eeafa 100644 --- a/tests/ValidatorTest.php +++ b/tests/ValidatorTest.php @@ -1,7 +1,7 @@ <?php -use LbilTech\TelegramGitNotifier\Bot; -use LbilTech\TelegramGitNotifier\Objects\Validator; +use CSlant\TelegramGitNotifier\Bot; +use CSlant\TelegramGitNotifier\Objects\Validator; beforeEach(function () { $this->bot = new Bot(); From bc1dd9cd776de64d3e5e755b13224c9a5dc86dfd Mon Sep 17 00:00:00 2001 From: tanhongit <tanhongit@users.noreply.github.com> Date: Thu, 2 Nov 2023 19:47:45 +0000 Subject: [PATCH 2/3] Fix styling --- src/Notifier.php | 2 +- src/Structures/App.php | 2 +- src/Structures/Notification.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Notifier.php b/src/Notifier.php index 4644f99..829ea48 100644 --- a/src/Notifier.php +++ b/src/Notifier.php @@ -2,7 +2,6 @@ namespace CSlant\TelegramGitNotifier; -use GuzzleHttp\Client; use CSlant\TelegramGitNotifier\Constants\EventConstant; use CSlant\TelegramGitNotifier\Constants\NotificationConstant; use CSlant\TelegramGitNotifier\Interfaces\EventInterface; @@ -12,6 +11,7 @@ use CSlant\TelegramGitNotifier\Structures\App; use CSlant\TelegramGitNotifier\Structures\Notification; use CSlant\TelegramGitNotifier\Trait\EventTrait; +use GuzzleHttp\Client; use Telegram; class Notifier implements AppInterface, NotificationInterface, EventInterface diff --git a/src/Structures/App.php b/src/Structures/App.php index e6836f8..a4ce7ec 100644 --- a/src/Structures/App.php +++ b/src/Structures/App.php @@ -2,9 +2,9 @@ namespace CSlant\TelegramGitNotifier\Structures; -use Exception; use CSlant\TelegramGitNotifier\Exceptions\EntryNotFoundException; use CSlant\TelegramGitNotifier\Exceptions\MessageIsEmptyException; +use Exception; use Telegram; trait App diff --git a/src/Structures/Notification.php b/src/Structures/Notification.php index 261b0fa..4f60e61 100644 --- a/src/Structures/Notification.php +++ b/src/Structures/Notification.php @@ -2,10 +2,10 @@ namespace CSlant\TelegramGitNotifier\Structures; -use GuzzleHttp\Exception\GuzzleException; use CSlant\TelegramGitNotifier\Constants\EventConstant; use CSlant\TelegramGitNotifier\Exceptions\MessageIsEmptyException; use CSlant\TelegramGitNotifier\Exceptions\SendNotificationException; +use GuzzleHttp\Exception\GuzzleException; use Symfony\Component\HttpFoundation\Request; trait Notification From 60cd1a7b6faeef0b5e73a3c19843e26d41e64c78 Mon Sep 17 00:00:00 2001 From: Tan Nguyen <35853002+tanhongit@users.noreply.github.com> Date: Fri, 3 Nov 2023 02:52:04 +0700 Subject: [PATCH 3/3] Create UPGRADING.md --- UPGRADING.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 UPGRADING.md diff --git a/UPGRADING.md b/UPGRADING.md new file mode 100644 index 0000000..fec26df --- /dev/null +++ b/UPGRADING.md @@ -0,0 +1,5 @@ +## Upgrading + +### Moving from lbiltech/telegram-git-notifier to cslant/telegram-git-notifier +- Run `composer remove lbiltech/telegram-git-notifier` and `composer require cslant/telegram-git-notifier` +- Replace any reference in your application from `LbilTech\TelegramGitNotifier` to `Cslant\TelegramGitNotifier`