Skip to content

Commit 5d05785

Browse files
authored
Merge pull request #28 from tanhongit/develop
some update v2
2 parents 8bd8e62 + 44846a3 commit 5d05785

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.github/workflows/deploy_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
deploy_test:
1717
name: Deploy to Test Server
1818
runs-on: self-hosted
19-
# needs: shellcheck
19+
needs: shellcheck
2020
steps:
2121
- name: Deploy to Remote Host
2222
uses: appleboy/ssh-action@master
@@ -29,4 +29,4 @@ jobs:
2929
cd /home/tannp/telegram-bot-github-notify
3030
git reset --hard HEAD
3131
git pull origin main
32-
composer install
32+
composer update

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"github-notifier",
1313
"github-telegram-bot"
1414
],
15+
"type": "project",
1516
"homepage": "https://github.com/tanhongit/telegram-bot-github-notify",
1617
"license": "MIT",
1718
"require": {

src/Services/TelegramService.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,31 @@ public function __construct()
2525
/**
2626
* @return void
2727
*/
28-
public function setToken(): void
28+
private function setToken(): void
2929
{
3030
$this->token = config('telegram-bot.token');
3131
}
3232

3333
/**
3434
* @return void
3535
*/
36-
public function setChatId(): void
36+
private function setChatId(): void
3737
{
3838
$this->chatId = config('telegram-bot.chat_id');
3939
}
4040

4141
/**
42-
* @return Telegram
42+
* @return void
4343
*/
44-
public function storeByToken(): Telegram
44+
private function storeByToken(): void
4545
{
4646
$this->telegram = new Telegram($this->token);
47-
return $this->telegram;
4847
}
4948

5049
/**
5150
* @return void
5251
*/
53-
public function getDataOfMessage(): void
52+
private function getDataOfMessage(): void
5453
{
5554
$this->messageData = $this->telegram->getData() ?? [];
5655
}
@@ -149,7 +148,7 @@ public function telegramToolHandler(string $text = null): void
149148
* @param string|null $callback
150149
* @return void
151150
*/
152-
public function sendCallbackResponse(string $callback = null): void
151+
protected function sendCallbackResponse(string $callback = null): void
153152
{
154153
if (!empty($callback) && $callback == 'about') {
155154
$reply = "Thanks for using our bot.\n\nThe bot is designed to send notifications based on GitHub events from your github repo instantly to your Telegram account.";

0 commit comments

Comments
 (0)