|
2 | 2 |
|
3 | 3 | return [
|
4 | 4 | 'app' => [
|
5 |
| - 'name' => env('APP_NAME', 'Laravel Telegram Git Notify'), |
6 |
| - 'url' => env('APP_URL', 'http://localhost:8000'), |
| 5 | + 'name' => env('TGN_APP_NAME', 'Laravel Telegram Git Notifier'), |
| 6 | + |
| 7 | + // Required for the bot to work properly |
| 8 | + 'url' => env('TGN_APP_URL', 'http://localhost:8000'), |
7 | 9 | 'timezone' => env('TIMEZONE', 'Asia/Ho_Chi_Minh'),
|
8 | 10 | ],
|
9 | 11 |
|
10 | 12 | 'bot' => [
|
11 | 13 | 'token' => env('TELEGRAM_BOT_TOKEN', ''),
|
12 | 14 | 'chat_id' => env('TELEGRAM_BOT_CHAT_ID', ''),
|
13 |
| - 'notify_chat_ids' => explode( |
14 |
| - ',', |
15 |
| - env('TELEGRAM_NOTIFY_CHAT_IDS', '') |
16 |
| - ), |
| 15 | + |
| 16 | + /** |
| 17 | + * Set the chat IDs that will receive notifications |
| 18 | + * You can add the owner bot ID, group ID, ... |
| 19 | + * ------------------------------------------------------- |
| 20 | + * Note: |
| 21 | + * Please use semicolon ";" to separate chat ids |
| 22 | + * And use a colon ":" to separate chat ID and thread ID |
| 23 | + * And use comma "," if you want to add multiple thread IDs |
| 24 | + * ------------------------------------------------------- |
| 25 | + * The environment variable is expected to be in the format: |
| 26 | + * "chat_id1;chat_id2:thread_id2;chat_id3:thread_id3_1,thread_id3_2;...". |
| 27 | + */ |
| 28 | + 'notify_chat_ids' => env('TELEGRAM_NOTIFY_CHAT_IDS', ''), |
17 | 29 | ],
|
18 | 30 |
|
19 | 31 | 'author' => [
|
20 |
| - 'discussion' => env('TGN_AUTHOR_CONTACT', 'https://t.me/tannp27'), |
| 32 | + 'discussion' => env( |
| 33 | + 'TGN_AUTHOR_DISCUSSION', |
| 34 | + 'https://github.com/lbiltech/laravel-telegram-git-notifier/discussions' |
| 35 | + ), |
21 | 36 | 'source_code' => env(
|
22 | 37 | 'TGN_AUTHOR_SOURCE_CODE',
|
23 | 38 | 'https://github.com/lbiltech/laravel-telegram-git-notifier'
|
24 | 39 | ),
|
25 | 40 | ],
|
26 | 41 |
|
| 42 | + /** Set the path to the data file */ |
| 43 | + 'data_file' => [ |
| 44 | + 'setting' => env( |
| 45 | + 'TGN_PATH_SETTING', |
| 46 | + storage_path('/app/json/tgn/tgn-settings.json') |
| 47 | + ), |
| 48 | + |
| 49 | + 'platform' => [ |
| 50 | + 'gitlab' => env( |
| 51 | + 'TGN_PATH_PLATFORM_GITLAB', |
| 52 | + storage_path('/app/json/tgn/gitlab-events.json') |
| 53 | + ), |
| 54 | + 'github' => env( |
| 55 | + 'TGN_PATH_PLATFORM_GITHUB', |
| 56 | + storage_path('/app/json/tgn/github-events.json') |
| 57 | + ), |
| 58 | + ], |
| 59 | + ], |
| 60 | + |
| 61 | + /** Set the path to the view file */ |
27 | 62 | 'view' => [
|
28 |
| - 'event' => [ |
| 63 | + 'default' => env( |
| 64 | + 'TGN_VIEW_DEFAULT', |
| 65 | + base_path('resources/views/vendor/telegram-git-notifier') |
| 66 | + ), |
| 67 | + |
| 68 | + 'event' => [ |
29 | 69 | 'default' => env('TGN_VIEW_EVENT_DEFAULT', 'default'),
|
30 | 70 | ],
|
| 71 | + |
31 | 72 | 'globals' => [
|
32 | 73 | 'access_denied' => env(
|
33 | 74 | 'TGN_VIEW_GLOBALS_ACCESS_DENIED',
|
34 | 75 | 'globals.access_denied'
|
35 | 76 | ),
|
36 | 77 | ],
|
37 |
| - 'tools' => [ |
| 78 | + |
| 79 | + 'tools' => [ |
38 | 80 | 'settings' => env(
|
39 | 81 | 'TGN_VIEW_TOOL_SETTING',
|
40 | 82 | 'tools.settings'
|
|
53 | 95 | ),
|
54 | 96 | ],
|
55 | 97 | ],
|
| 98 | + |
56 | 99 | ];
|
0 commit comments