Skip to content

Commit

Permalink
refactor: Update namespace from LbilTech to CSlant
Browse files Browse the repository at this point in the history
- Changed primary namespace from "LbilTech\\TelegramGitNotifierApp" to "CSlant\\TelegramGitNotifierApp".
- 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.
  • Loading branch information
tanhongit committed Nov 3, 2023
1 parent 768de44 commit 04e661d
Show file tree
Hide file tree
Showing 17 changed files with 67 additions and 88 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ 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="GitHub and GitLab notifications to telegram php" src="https://github.com/lbiltech/telegram-git-notifier-app/assets/35853002/0ff2d68f-44ea-462f-92c3-6f6b40b16162" />
<img alt="GitHub and GitLab notifications to telegram php" src="https://github.com/cslant/telegram-git-notifier-app/assets/35853002/0ff2d68f-44ea-462f-92c3-6f6b40b16162" />
</p>

![License](https://img.shields.io/github/license/lbiltech/telegram-git-notifier-app.svg?style=flat-square)
[![Latest Version](https://img.shields.io/github/release/lbiltech/telegram-git-notifier-app.svg?style=flat-square)](https://github.com/lbiltech/telegram-git-notifier-app/releases)
![License](https://img.shields.io/github/license/cslant/telegram-git-notifier-app.svg?style=flat-square)
[![Latest Version](https://img.shields.io/github/release/cslant/telegram-git-notifier-app.svg?style=flat-square)](https://github.com/cslant/telegram-git-notifier-app/releases)
[![StyleCI](https://styleci.io/repos/656960426/shield)](https://styleci.io/repos/656960426)
[![Quality Score](https://img.shields.io/scrutinizer/g/lbiltech/telegram-git-notifier-app.svg?style=flat-square)](https://scrutinizer-ci.com/g/lbiltech/telegram-git-notifier-app)
[![Maintainability](https://api.codeclimate.com/v1/badges/7ccaccebe9cd58ff3df5/maintainability)](https://codeclimate.com/github/lbiltech/telegram-git-notifier-app/maintainability)
[![Quality Score](https://img.shields.io/scrutinizer/g/cslant/telegram-git-notifier-app.svg?style=flat-square)](https://scrutinizer-ci.com/g/cslant/telegram-git-notifier-app)
[![Maintainability](https://api.codeclimate.com/v1/badges/7ccaccebe9cd58ff3df5/maintainability)](https://codeclimate.com/github/cslant/telegram-git-notifier-app/maintainability)

## 📝 Information

Expand All @@ -25,7 +25,7 @@ and manage customization through messages and buttons on Telegram.
1. **GitHub/GitLab Notifications to Telegram**: The package allows you to configure a Telegram bot to receive notifications from various GitHub/GitLab events, including events like **commits, pull requests, issues, releases, and many more**.

<p align="center">
<img alt="GitHub/GitLab Notifications to Telegram" src="https://github.com/lbiltech/telegram-git-notifier-app/assets/35853002/462f330f-11d3-43ef-89cf-c70ade57b654" />
<img alt="GitHub/GitLab Notifications to Telegram" src="https://github.com/cslant/telegram-git-notifier-app/assets/35853002/462f330f-11d3-43ef-89cf-c70ade57b654" />
</p>

2. **Customize Notifications**: You can customize the types of notifications you want to receive through options on Telegram.
Expand All @@ -42,7 +42,7 @@ and manage customization through messages and buttons on Telegram.
- Manage event notifications separately between platforms.

<p align="center">
<img alt="Event Management to Telegram" src="https://github.com/lbiltech/telegram-git-notifier-app/assets/35853002/e217a2ad-49b5-4936-a2cd-fe4af66e2bfb" />
<img alt="Event Management to Telegram" src="https://github.com/cslant/telegram-git-notifier-app/assets/35853002/e217a2ad-49b5-4936-a2cd-fe4af66e2bfb" />
</p>

5. **Easy Integration**:
Expand All @@ -67,7 +67,7 @@ and manage customization through messages and buttons on Telegram.

- PHP ^8.0
- [Composer](https://getcomposer.org/)
- Core: [Telegram Git Notifier](https://github.com/lbiltech/telegram-git-notifier)
- Core: [Telegram Git Notifier](https://github.com/cslant/telegram-git-notifier)

## 🔧 Installation

Expand All @@ -90,7 +90,7 @@ Please choose only one of the following two ways to set up the project.
First, please clone and install this project via [Composer](https://getcomposer.org/):

```bash
composer create-project lbiltech/telegram-git-notifier-app
composer create-project cslant/telegram-git-notifier-app
```

After running the command above, you will have the project installed under the `telegram-git-notifier-app` directory,
Expand Down Expand Up @@ -159,7 +159,7 @@ At this time, the source launch process is done, please skip way 2 and go to ste
First, please clone this project and copy the environment file `.env.example` to `.env`:

```bash
git clone git@github.com:lbiltech/telegram-git-notifier-app.git
git clone git@github.com:cslant/telegram-git-notifier-app.git
cd telegram-git-notifier-app
cp .env.example .env
```
Expand Down Expand Up @@ -217,7 +217,7 @@ In this way, we use the proxy in the container and [ngrok](https://ngrok.com/) t
Example:

![image](https://github.com/lbiltech/lemp-docker/assets/35853002/8dc8ba3f-b1e9-4bff-901d-6bb7747acda4)
![image](https://github.com/cslant/lemp-docker/assets/35853002/8dc8ba3f-b1e9-4bff-901d-6bb7747acda4)

2. Download and install [ngrok](https://ngrok.com/download).
2. Continue to run the command in the terminal: `ngrok http <CONTAINER_IP>`
Expand Down Expand Up @@ -373,7 +373,7 @@ You can use all the features of this bot.
🎉🎉

<p align="center">
<img alt="Menu features of this bot" src="https://github.com/lbiltech/telegram-git-notifier-app/assets/35853002/1a725130-c7c4-4594-9669-abc6d2dc1fba" />
<img alt="Menu features of this bot" src="https://github.com/cslant/telegram-git-notifier-app/assets/35853002/1a725130-c7c4-4594-9669-abc6d2dc1fba" />
</p>

**To increase ease of use. Let's create a menu with a list of commands listed for you.**
Expand All @@ -385,7 +385,7 @@ Please send the following message to your bot to create a menu button.
```

<p align="center">
<img alt="Set menu" src="https://github.com/lbiltech/telegram-git-notifier-app/assets/35853002/70f79e8f-b075-455d-b928-f721ca5b11cc" /> <img alt="Set menu" src="https://github.com/lbiltech/telegram-git-notifier-app/assets/35853002/53af5d51-7aa8-4dd8-99f6-3b55a9971cbe" />
<img alt="Set menu" src="https://github.com/cslant/telegram-git-notifier-app/assets/35853002/70f79e8f-b075-455d-b928-f721ca5b11cc" /> <img alt="Set menu" src="https://github.com/cslant/telegram-git-notifier-app/assets/35853002/53af5d51-7aa8-4dd8-99f6-3b55a9971cbe" />
</p>

Now you will need to add the Webhook for your GitHub and GitLab repository to receive notifications.
Expand All @@ -404,7 +404,7 @@ Now you will need to add the Webhook for your GitHub and GitLab repository to re
Here is the first notification you will receive:

<p align="center">
<img alt="Github ping event notification" src="https://github.com/lbiltech/telegram-git-notifier-app/assets/35853002/66b7fffa-d2fa-41f6-8caa-3c1ab96b63be" />
<img alt="Github ping event notification" src="https://github.com/cslant/telegram-git-notifier-app/assets/35853002/66b7fffa-d2fa-41f6-8caa-3c1ab96b63be" />
</p>

## 📌 Add a webhook on your GitLab repository to receive notifications
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "lbiltech/telegram-git-notifier-app",
"name": "cslant/telegram-git-notifier-app",
"description": "The PHP app to send notification from Gitlab and Github events to Telegram",
"keywords": [
"lbiltech",
"cslant",
"telegram-bot",
"notify",
"git-webhook",
Expand All @@ -17,16 +17,16 @@
"telegram-git-notifier-app"
],
"type": "project",
"homepage": "https://github.com/lbiltech/telegram-git-notifier-app",
"homepage": "https://github.com/cslant/telegram-git-notifier-app",
"license": "MIT",
"require": {
"php": "^8.0",
"ext-json": "*",
"lbiltech/telegram-git-notifier": "^1.2.0"
"cslant/telegram-git-notifier": "^1.3.0"
},
"autoload": {
"psr-4": {
"LbilTech\\TelegramGitNotifierApp\\": "src/"
"CSlant\\TelegramGitNotifierApp\\": "src/"
}
},
"authors": [
Expand All @@ -38,18 +38,18 @@
}
],
"support": {
"issues": "https://github.com/lbiltech/telegram-git-notifier-app/issues"
"issues": "https://github.com/cslant/telegram-git-notifier-app/issues"
},
"config": {
"sort-packages": true,
"optimize-autoloader": true
},
"scripts": {
"post-install-cmd": [
"bash ./install.sh"
"bash vendor/cslant/telegram-git-notifier-app/install.sh"
],
"post-update-cmd": [
"bash ./install.sh"
"bash vendor/cslant/telegram-git-notifier-app/install.sh"
]
}
}
10 changes: 5 additions & 5 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

use LbilTech\TelegramGitNotifier\Exceptions\EntryNotFoundException;
use LbilTech\TelegramGitNotifier\Exceptions\InvalidViewTemplateException;
use LbilTech\TelegramGitNotifier\Exceptions\MessageIsEmptyException;
use LbilTech\TelegramGitNotifier\Exceptions\SendNotificationException;
use LbilTech\TelegramGitNotifierApp\Http\Actions\IndexAction;
use CSlant\TelegramGitNotifier\Exceptions\EntryNotFoundException;
use CSlant\TelegramGitNotifier\Exceptions\InvalidViewTemplateException;
use CSlant\TelegramGitNotifier\Exceptions\MessageIsEmptyException;
use CSlant\TelegramGitNotifier\Exceptions\SendNotificationException;
use CSlant\TelegramGitNotifierApp\Http\Actions\IndexAction;

require __DIR__ . '/init.php';

Expand Down
21 changes: 0 additions & 21 deletions install.sh

This file was deleted.

2 changes: 1 addition & 1 deletion resources/views/tools/menu.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use LbilTech\TelegramGitNotifierApp\Services\CommandService;
use CSlant\TelegramGitNotifierApp\Services\CommandService;

$menuCommands = CommandService::MENU_COMMANDS ?? [];
?>
Expand Down
12 changes: 6 additions & 6 deletions src/Http/Actions/CallbackAction.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace LbilTech\TelegramGitNotifierApp\Http\Actions;
namespace CSlant\TelegramGitNotifierApp\Http\Actions;

use LbilTech\TelegramGitNotifier\Bot;
use LbilTech\TelegramGitNotifier\Constants\SettingConstant;
use LbilTech\TelegramGitNotifier\Exceptions\InvalidViewTemplateException;
use LbilTech\TelegramGitNotifier\Exceptions\MessageIsEmptyException;
use LbilTech\TelegramGitNotifierApp\Services\CallbackService;
use CSlant\TelegramGitNotifier\Bot;
use CSlant\TelegramGitNotifier\Constants\SettingConstant;
use CSlant\TelegramGitNotifier\Exceptions\InvalidViewTemplateException;
use CSlant\TelegramGitNotifier\Exceptions\MessageIsEmptyException;
use CSlant\TelegramGitNotifierApp\Services\CallbackService;

class CallbackAction
{
Expand Down
10 changes: 5 additions & 5 deletions src/Http/Actions/CommandAction.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace LbilTech\TelegramGitNotifierApp\Http\Actions;
namespace CSlant\TelegramGitNotifierApp\Http\Actions;

use LbilTech\TelegramGitNotifier\Bot;
use LbilTech\TelegramGitNotifier\Exceptions\EntryNotFoundException;
use LbilTech\TelegramGitNotifier\Exceptions\MessageIsEmptyException;
use LbilTech\TelegramGitNotifierApp\Services\CommandService;
use CSlant\TelegramGitNotifier\Bot;
use CSlant\TelegramGitNotifier\Exceptions\EntryNotFoundException;
use CSlant\TelegramGitNotifier\Exceptions\MessageIsEmptyException;
use CSlant\TelegramGitNotifierApp\Services\CommandService;

class CommandAction
{
Expand Down
14 changes: 7 additions & 7 deletions src/Http/Actions/IndexAction.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace LbilTech\TelegramGitNotifierApp\Http\Actions;
namespace CSlant\TelegramGitNotifierApp\Http\Actions;

use GuzzleHttp\Client;
use LbilTech\TelegramGitNotifier\Bot;
use LbilTech\TelegramGitNotifier\Exceptions\EntryNotFoundException;
use LbilTech\TelegramGitNotifier\Exceptions\InvalidViewTemplateException;
use LbilTech\TelegramGitNotifier\Exceptions\MessageIsEmptyException;
use LbilTech\TelegramGitNotifier\Exceptions\SendNotificationException;
use LbilTech\TelegramGitNotifier\Notifier;
use CSlant\TelegramGitNotifier\Bot;
use CSlant\TelegramGitNotifier\Exceptions\EntryNotFoundException;
use CSlant\TelegramGitNotifier\Exceptions\InvalidViewTemplateException;
use CSlant\TelegramGitNotifier\Exceptions\MessageIsEmptyException;
use CSlant\TelegramGitNotifier\Exceptions\SendNotificationException;
use CSlant\TelegramGitNotifier\Notifier;
use Symfony\Component\HttpFoundation\Request;
use Telegram;

Expand Down
12 changes: 6 additions & 6 deletions src/Http/Actions/SendNotificationAction.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace LbilTech\TelegramGitNotifierApp\Http\Actions;
namespace CSlant\TelegramGitNotifierApp\Http\Actions;

use LbilTech\TelegramGitNotifier\Exceptions\InvalidViewTemplateException;
use LbilTech\TelegramGitNotifier\Exceptions\SendNotificationException;
use LbilTech\TelegramGitNotifier\Models\Setting;
use LbilTech\TelegramGitNotifier\Notifier;
use LbilTech\TelegramGitNotifier\Objects\Validator;
use CSlant\TelegramGitNotifier\Exceptions\InvalidViewTemplateException;
use CSlant\TelegramGitNotifier\Exceptions\SendNotificationException;
use CSlant\TelegramGitNotifier\Models\Setting;
use CSlant\TelegramGitNotifier\Notifier;
use CSlant\TelegramGitNotifier\Objects\Validator;
use Symfony\Component\HttpFoundation\Request;

class SendNotificationAction
Expand Down
4 changes: 2 additions & 2 deletions src/Http/Actions/WebhookAction.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace LbilTech\TelegramGitNotifierApp\Http\Actions;
namespace CSlant\TelegramGitNotifierApp\Http\Actions;

use LbilTech\TelegramGitNotifier\Webhook;
use CSlant\TelegramGitNotifier\Webhook;

class WebhookAction
{
Expand Down
10 changes: 5 additions & 5 deletions src/Services/CallbackService.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace LbilTech\TelegramGitNotifierApp\Services;
namespace CSlant\TelegramGitNotifierApp\Services;

use LbilTech\TelegramGitNotifier\Bot;
use LbilTech\TelegramGitNotifier\Constants\SettingConstant;
use LbilTech\TelegramGitNotifier\Exceptions\MessageIsEmptyException;
use LbilTech\TelegramGitNotifierApp\Traits\Markup;
use CSlant\TelegramGitNotifier\Bot;
use CSlant\TelegramGitNotifier\Constants\SettingConstant;
use CSlant\TelegramGitNotifier\Exceptions\MessageIsEmptyException;
use CSlant\TelegramGitNotifierApp\Traits\Markup;

class CallbackService
{
Expand Down
8 changes: 4 additions & 4 deletions src/Services/CommandService.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace LbilTech\TelegramGitNotifierApp\Services;
namespace CSlant\TelegramGitNotifierApp\Services;

use LbilTech\TelegramGitNotifier\Bot;
use LbilTech\TelegramGitNotifier\Exceptions\EntryNotFoundException;
use LbilTech\TelegramGitNotifierApp\Traits\Markup;
use CSlant\TelegramGitNotifier\Bot;
use CSlant\TelegramGitNotifier\Exceptions\EntryNotFoundException;
use CSlant\TelegramGitNotifierApp\Traits\Markup;

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

namespace LbilTech\TelegramGitNotifierApp\Traits;
namespace CSlant\TelegramGitNotifierApp\Traits;

use Telegram;

Expand Down
Empty file removed storage/json/tgn/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion webhook/delete.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use LbilTech\TelegramGitNotifierApp\Http\Actions\WebhookAction;
use CSlant\TelegramGitNotifierApp\Http\Actions\WebhookAction;

require __DIR__ . '/../init.php';

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

use LbilTech\TelegramGitNotifierApp\Http\Actions\WebhookAction;
use CSlant\TelegramGitNotifierApp\Http\Actions\WebhookAction;

require __DIR__ . '/../init.php';

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

use LbilTech\TelegramGitNotifierApp\Http\Actions\WebhookAction;
use CSlant\TelegramGitNotifierApp\Http\Actions\WebhookAction;

require __DIR__ . '/../init.php';

Expand Down

0 comments on commit 04e661d

Please sign in to comment.