-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from tanhongit/upgrade
Upgrade
- Loading branch information
Showing
23 changed files
with
222 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Check & fix styling | ||
|
||
on: [push] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
php-cs-fixer: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Run PHP CS Fixer | ||
uses: docker://oskarstark/php-cs-fixer-ga | ||
with: | ||
args: --config=.php-cs-fixer.dist.php --allow-risky=yes | ||
|
||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: Fix styling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,28 @@ | ||
name: Setup and test | ||
name: Setup & test | ||
|
||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
tests: | ||
name: Composer setup and tests | ||
runs-on: ubuntu-latest | ||
name: Composer P${{ matrix.php }} - ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
php: [ '8.1', '8.2' ] | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
php-version: ${{ matrix.php }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer install --no-interaction --no-progress --no-suggest | ||
- name: Run tests | ||
run: | | ||
composer validate --strict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Update Changelog | ||
|
||
on: | ||
release: | ||
types: [released] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
|
||
- name: Update Changelog | ||
uses: stefanzweifel/changelog-updater-action@v1 | ||
with: | ||
latest-version: ${{ github.event.release.name }} | ||
release-notes: ${{ github.event.release.body }} | ||
|
||
- name: Commit updated CHANGELOG | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
branch: main | ||
commit_message: Update CHANGELOG | ||
file_pattern: CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,8 @@ storage | |
.docker | ||
*.log | ||
logs | ||
|
||
build | ||
.php-cs-fixer.cache | ||
.phpunit.cache | ||
.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
$finder = Symfony\Component\Finder\Finder::create() | ||
->in([ | ||
__DIR__ . '/src', | ||
]) | ||
->name('*.php') | ||
->ignoreDotFiles(true) | ||
->ignoreVCS(true); | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setRules([ | ||
'@PSR12' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'ordered_imports' => ['sort_algorithm' => 'alpha'], | ||
'no_unused_imports' => true, | ||
'trailing_comma_in_multiline' => true, | ||
'phpdoc_scalar' => true, | ||
'unary_operator_spaces' => true, | ||
'binary_operator_spaces' => true, | ||
'blank_line_before_statement' => [ | ||
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'], | ||
], | ||
'phpdoc_single_line_var_spacing' => true, | ||
'phpdoc_var_without_name' => true, | ||
'class_attributes_separation' => [ | ||
'elements' => [ | ||
'method' => 'one', | ||
], | ||
], | ||
'method_argument_space' => [ | ||
'on_multiline' => 'ensure_fully_multiline', | ||
'keep_multiple_spaces_after_comma' => true, | ||
], | ||
'single_trait_insert_per_statement' => true, | ||
]) | ||
->setFinder($finder); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|
@@ -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. | ||
|
@@ -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**: | ||
|
@@ -65,9 +65,9 @@ and manage customization through messages and buttons on Telegram. | |
|
||
## 📋 Requirements | ||
|
||
- PHP ^8.0 | ||
- PHP ^8.1 | ||
- [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 | ||
|
||
|
@@ -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, | ||
|
@@ -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 [email protected]:lbiltech/telegram-git-notifier-app.git | ||
git clone [email protected]:cslant/telegram-git-notifier-app.git | ||
cd telegram-git-notifier-app | ||
cp .env.example .env | ||
``` | ||
|
@@ -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>` | ||
|
@@ -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.** | ||
|
@@ -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. | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Upgrading | ||
|
||
### Moving from lbiltech/telegram-git-notifier-app to cslant/telegram-git-notifier-app | ||
|
||
- Replace any reference in your application from `LbilTech\TelegramGitNotifierApp` to `CSlant\TelegramGitNotifierApp` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.