File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 16
16
deploy_test :
17
17
name : Deploy to Test Server
18
18
runs-on : self-hosted
19
- # needs: shellcheck
19
+ needs : shellcheck
20
20
steps :
21
21
- name : Deploy to Remote Host
22
22
uses : appleboy/ssh-action@master
29
29
cd /home/tannp/telegram-bot-github-notify
30
30
git reset --hard HEAD
31
31
git pull origin main
32
- composer install
32
+ composer update
Original file line number Diff line number Diff line change 12
12
" github-notifier" ,
13
13
" github-telegram-bot"
14
14
],
15
+ "type" : " project" ,
15
16
"homepage" : " https://github.com/tanhongit/telegram-bot-github-notify" ,
16
17
"license" : " MIT" ,
17
18
"require" : {
Original file line number Diff line number Diff line change @@ -25,32 +25,31 @@ public function __construct()
25
25
/**
26
26
* @return void
27
27
*/
28
- public function setToken (): void
28
+ private function setToken (): void
29
29
{
30
30
$ this ->token = config ('telegram-bot.token ' );
31
31
}
32
32
33
33
/**
34
34
* @return void
35
35
*/
36
- public function setChatId (): void
36
+ private function setChatId (): void
37
37
{
38
38
$ this ->chatId = config ('telegram-bot.chat_id ' );
39
39
}
40
40
41
41
/**
42
- * @return Telegram
42
+ * @return void
43
43
*/
44
- public function storeByToken (): Telegram
44
+ private function storeByToken (): void
45
45
{
46
46
$ this ->telegram = new Telegram ($ this ->token );
47
- return $ this ->telegram ;
48
47
}
49
48
50
49
/**
51
50
* @return void
52
51
*/
53
- public function getDataOfMessage (): void
52
+ private function getDataOfMessage (): void
54
53
{
55
54
$ this ->messageData = $ this ->telegram ->getData () ?? [];
56
55
}
@@ -149,7 +148,7 @@ public function telegramToolHandler(string $text = null): void
149
148
* @param string|null $callback
150
149
* @return void
151
150
*/
152
- public function sendCallbackResponse (string $ callback = null ): void
151
+ protected function sendCallbackResponse (string $ callback = null ): void
153
152
{
154
153
if (!empty ($ callback ) && $ callback == 'about ' ) {
155
154
$ 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. " ;
You can’t perform that action at this time.
0 commit comments