Skip to content

Commit

Permalink
Merge pull request #10 from pxthinh/feature/webhook_1
Browse files Browse the repository at this point in the history
#9: update config for laravel
  • Loading branch information
tanhongit authored Oct 12, 2023
2 parents e6c6b9f + 05ff08d commit 57cabc9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
37 changes: 30 additions & 7 deletions config/telegram-git-notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

return [
'app' => [
'name' => env('APP_NAME', 'Laravel Telegram Git Notify'),
'name' => env('APP_NAME', 'Laravel Telegram Git Notify'),
'url' => env('APP_URL', 'http://localhost:8000'),
'timezone' => env('TIMEZONE', 'Asia/Ho_Chi_Minh'),
],

'telegram-bot' => [
'bot' => [
'token' => env('TELEGRAM_BOT_TOKEN', ''),
'chat_id' => env('TELEGRAM_BOT_CHAT_ID', ''),
'notify_chat_ids' => explode(
Expand All @@ -17,17 +17,40 @@
],

'author' => [
'contact' => env('TGN_AUTHOR_CONTACT', 'https://t.me/tannp27'),
'source_code' => env('TGN_AUTHOR_SOURCE_CODE', 'https://github.com/lbiltech/telegram-git-notifier'),
'discussion' => env('TGN_AUTHOR_CONTACT', 'https://t.me/tannp27'),
'source_code' => env(
'TGN_AUTHOR_SOURCE_CODE',
'https://github.com/lbiltech/laravel-telegram-git-notifier'
),
],

'view' => [
'path' => env('TGN_VIEW_PATH', 'resources/views/telegram-git-notifier'),
'event' => [
'event' => [
'default' => env('TGN_VIEW_EVENT_DEFAULT', 'default'),
],
'globals' => [
'access_denied' => env('TGN_VIEW_GLOBALS_ACCESS_DENIED', 'globals.access_denied'),
'access_denied' => env(
'TGN_VIEW_GLOBALS_ACCESS_DENIED',
'globals.access_denied'
),
],
'tools' => [
'settings' => env(
'TGN_VIEW_TOOL_SETTING',
'tools.settings'
),
'custom_event_action' => env(
'TGN_VIEW_TOOL_CUSTOM_EVENT_ACTION',
'tools.custom_event_action'
),
'custom_event' => env(
'TGN_VIEW_TOOL_CUSTOM_EVENT',
'tools.custom_event'
),
'set_menu_cmd' => env(
'TGN_VIEW_TOOL_SET_MENU_COMMAND',
'tools.set_menu_cmd'
),
],
],
];
2 changes: 1 addition & 1 deletion src/Http/Actions/WebhookAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class WebhookAction
public function __construct(WebhookService $webhookService)
{
$this->webhookService = $webhookService;
$this->webhookService->setToken(config('telegram-git-notifier.telegram-bot.token'));
$this->webhookService->setToken(config('telegram-git-notifier.bot.token'));
$this->webhookService->setUrl(config('telegram-git-notifier.app.url'));
}

Expand Down

0 comments on commit 57cabc9

Please sign in to comment.