Skip to content

Commit

Permalink
Merge pull request #27 from tanhongit/upgrade
Browse files Browse the repository at this point in the history
Upgrade namespace
  • Loading branch information
tanhongit authored Nov 2, 2023
2 parents e45b5a7 + 60cd1a7 commit 5dd2a93
Show file tree
Hide file tree
Showing 37 changed files with 107 additions and 102 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
5 changes: 5 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -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`
2 changes: 1 addition & 1 deletion common/helpers.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use LbilTech\TelegramGitNotifier\Helpers\ConfigHelper;
use CSlant\TelegramGitNotifier\Helpers\ConfigHelper;

if (!function_exists('tgn_singularity')) {
/**
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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": [
{
Expand All @@ -27,15 +27,15 @@
],
"autoload": {
"psr-4": {
"LbilTech\\TelegramGitNotifier\\": "src/"
"CSlant\\TelegramGitNotifier\\": "src/"
},
"files": [
"common/helpers.php"
]
},
"autoload-dev": {
"psr-4": {
"LbilTech\\TelegramGitNotifier\\Tests\\": "tests"
"CSlant\\TelegramGitNotifier\\Tests\\": "tests"
}
},
"require": {
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions config/tg-notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
28 changes: 14 additions & 14 deletions src/Bot.php
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Constants/EventConstant.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace LbilTech\TelegramGitNotifier\Constants;
namespace CSlant\TelegramGitNotifier\Constants;

final class EventConstant
{
Expand Down
2 changes: 1 addition & 1 deletion src/Constants/NotificationConstant.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace LbilTech\TelegramGitNotifier\Constants;
namespace CSlant\TelegramGitNotifier\Constants;

final class NotificationConstant
{
Expand Down
2 changes: 1 addition & 1 deletion src/Constants/SettingConstant.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace LbilTech\TelegramGitNotifier\Constants;
namespace CSlant\TelegramGitNotifier\Constants;

final class SettingConstant
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/CallbackException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace LbilTech\TelegramGitNotifier\Exceptions;
namespace CSlant\TelegramGitNotifier\Exceptions;

final class CallbackException extends TelegramGitNotifierException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/EntryNotFoundException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace LbilTech\TelegramGitNotifier\Exceptions;
namespace CSlant\TelegramGitNotifier\Exceptions;

final class EntryNotFoundException extends TelegramGitNotifierException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidViewTemplateException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace LbilTech\TelegramGitNotifier\Exceptions;
namespace CSlant\TelegramGitNotifier\Exceptions;

use Throwable;

Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MessageIsEmptyException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace LbilTech\TelegramGitNotifier\Exceptions;
namespace CSlant\TelegramGitNotifier\Exceptions;

final class MessageIsEmptyException extends TelegramGitNotifierException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/SendNotificationException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace LbilTech\TelegramGitNotifier\Exceptions;
namespace CSlant\TelegramGitNotifier\Exceptions;

final class SendNotificationException extends TelegramGitNotifierException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/TelegramGitNotifierException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace LbilTech\TelegramGitNotifier\Exceptions;
namespace CSlant\TelegramGitNotifier\Exceptions;

use Exception;

Expand Down
6 changes: 3 additions & 3 deletions src/Helpers/ConfigHelper.php
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Interfaces/BotInterface.php
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions src/Interfaces/EventInterface.php
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 6 additions & 6 deletions src/Interfaces/SettingInterface.php
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions src/Interfaces/Structures/AppInterface.php
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
8 changes: 4 additions & 4 deletions src/Interfaces/Structures/NotificationInterface.php
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Interfaces/WebhookInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace LbilTech\TelegramGitNotifier\Interfaces;
namespace CSlant\TelegramGitNotifier\Interfaces;

interface WebhookInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Models/Event.php
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions src/Models/Setting.php
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
22 changes: 11 additions & 11 deletions src/Notifier.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?php

namespace LbilTech\TelegramGitNotifier;

namespace CSlant\TelegramGitNotifier;

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 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 Telegram;

class Notifier implements AppInterface, NotificationInterface, EventInterface
Expand Down
8 changes: 4 additions & 4 deletions src/Objects/Validator.php
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions src/Structures/App.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace LbilTech\TelegramGitNotifier\Structures;
namespace CSlant\TelegramGitNotifier\Structures;

use CSlant\TelegramGitNotifier\Exceptions\EntryNotFoundException;
use CSlant\TelegramGitNotifier\Exceptions\MessageIsEmptyException;
use Exception;
use LbilTech\TelegramGitNotifier\Exceptions\EntryNotFoundException;
use LbilTech\TelegramGitNotifier\Exceptions\MessageIsEmptyException;
use Telegram;

trait App
Expand Down
8 changes: 4 additions & 4 deletions src/Structures/Notification.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace LbilTech\TelegramGitNotifier\Structures;
namespace CSlant\TelegramGitNotifier\Structures;

use CSlant\TelegramGitNotifier\Constants\EventConstant;
use CSlant\TelegramGitNotifier\Exceptions\MessageIsEmptyException;
use CSlant\TelegramGitNotifier\Exceptions\SendNotificationException;
use GuzzleHttp\Exception\GuzzleException;
use LbilTech\TelegramGitNotifier\Constants\EventConstant;
use LbilTech\TelegramGitNotifier\Exceptions\MessageIsEmptyException;
use LbilTech\TelegramGitNotifier\Exceptions\SendNotificationException;
use Symfony\Component\HttpFoundation\Request;

trait Notification
Expand Down
Loading

0 comments on commit 5dd2a93

Please sign in to comment.