Skip to content

Commit

Permalink
Merge pull request #28 from tanhongit/develop
Browse files Browse the repository at this point in the history
some update v2
  • Loading branch information
tanhongit authored Jun 25, 2023
2 parents 8bd8e62 + 44846a3 commit 5d05785
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
deploy_test:
name: Deploy to Test Server
runs-on: self-hosted
# needs: shellcheck
needs: shellcheck
steps:
- name: Deploy to Remote Host
uses: appleboy/ssh-action@master
Expand All @@ -29,4 +29,4 @@ jobs:
cd /home/tannp/telegram-bot-github-notify
git reset --hard HEAD
git pull origin main
composer install
composer update
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"github-notifier",
"github-telegram-bot"
],
"type": "project",
"homepage": "https://github.com/tanhongit/telegram-bot-github-notify",
"license": "MIT",
"require": {
Expand Down
13 changes: 6 additions & 7 deletions src/Services/TelegramService.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,31 @@ public function __construct()
/**
* @return void
*/
public function setToken(): void
private function setToken(): void
{
$this->token = config('telegram-bot.token');
}

/**
* @return void
*/
public function setChatId(): void
private function setChatId(): void
{
$this->chatId = config('telegram-bot.chat_id');
}

/**
* @return Telegram
* @return void
*/
public function storeByToken(): Telegram
private function storeByToken(): void
{
$this->telegram = new Telegram($this->token);
return $this->telegram;
}

/**
* @return void
*/
public function getDataOfMessage(): void
private function getDataOfMessage(): void
{
$this->messageData = $this->telegram->getData() ?? [];
}
Expand Down Expand Up @@ -149,7 +148,7 @@ public function telegramToolHandler(string $text = null): void
* @param string|null $callback
* @return void
*/
public function sendCallbackResponse(string $callback = null): void
protected function sendCallbackResponse(string $callback = null): void
{
if (!empty($callback) && $callback == 'about') {
$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.";
Expand Down

0 comments on commit 5d05785

Please sign in to comment.