├── .github
├── FUNDING.yml
├── dependabot.yml
└── workflows
│ ├── php-cs-fixer.yml
│ ├── phpstan.yml
│ ├── update-changelog.yml
│ ├── setup_test.yml
│ └── dependabot-auto-merge.yml
├── .styleci.yml
├── resources
├── views
│ ├── tools
│ │ ├── settings.blade.php
│ │ ├── id.blade.php
│ │ ├── token.blade.php
│ │ ├── about.blade.php
│ │ ├── set_menu_cmd.blade.php
│ │ ├── start.blade.php
│ │ ├── menu.blade.php
│ │ ├── custom_event_action.blade.php
│ │ ├── usage.blade.php
│ │ ├── custom_event.blade.php
│ │ └── server.blade.php
│ ├── events
│ │ ├── gitlab
│ │ │ ├── emoji
│ │ │ │ └── default.blade.php
│ │ │ ├── deployment
│ │ │ │ └── default.blade.php
│ │ │ ├── merge_request
│ │ │ │ ├── partials
│ │ │ │ │ └── _reviewers.blade.php
│ │ │ │ ├── default.blade.php
│ │ │ │ ├── close.blade.php
│ │ │ │ ├── merge.blade.php
│ │ │ │ ├── open.blade.php
│ │ │ │ ├── update.blade.php
│ │ │ │ ├── reopen.blade.php
│ │ │ │ ├── approval.blade.php
│ │ │ │ ├── approved.blade.php
│ │ │ │ ├── unapproval.blade.php
│ │ │ │ └── unapproved.blade.php
│ │ │ ├── note
│ │ │ │ ├── issue.blade.php
│ │ │ │ ├── snippet.blade.php
│ │ │ │ ├── merge_request.blade.php
│ │ │ │ └── commit.blade.php
│ │ │ ├── wiki_page
│ │ │ │ ├── create.blade.php
│ │ │ │ ├── delete.blade.php
│ │ │ │ └── update.blade.php
│ │ │ ├── tag_push
│ │ │ │ └── default.blade.php
│ │ │ ├── release
│ │ │ │ ├── create.blade.php
│ │ │ │ ├── delete.blade.php
│ │ │ │ └── update.blade.php
│ │ │ ├── issue
│ │ │ │ ├── close.blade.php
│ │ │ │ ├── open.blade.php
│ │ │ │ ├── reopen.blade.php
│ │ │ │ ├── default.blade.php
│ │ │ │ └── update.blade.php
│ │ │ ├── job
│ │ │ │ └── default.blade.php
│ │ │ ├── pipeline
│ │ │ │ └── default.blade.php
│ │ │ ├── confidential_issue
│ │ │ │ └── default.blade.php
│ │ │ ├── feature_flag
│ │ │ │ └── default.blade.php
│ │ │ └── push
│ │ │ │ └── default.blade.php
│ │ ├── github
│ │ │ ├── star
│ │ │ │ ├── created.blade.php
│ │ │ │ └── deleted.blade.php
│ │ │ ├── watch
│ │ │ │ └── started.blade.php
│ │ │ ├── label
│ │ │ │ ├── deleted.blade.php
│ │ │ │ ├── created.blade.php
│ │ │ │ └── edited.blade.php
│ │ │ ├── branch_protection_rule
│ │ │ │ ├── deleted.blade.php
│ │ │ │ ├── created.blade.php
│ │ │ │ └── edited.blade.php
│ │ │ ├── deploy_key
│ │ │ │ ├── created.blade.php
│ │ │ │ └── deleted.blade.php
│ │ │ ├── workflow_job
│ │ │ │ ├── queued.blade.php
│ │ │ │ ├── in_progress.blade.php
│ │ │ │ └── completed.blade.php
│ │ │ ├── pull_request
│ │ │ │ ├── partials
│ │ │ │ │ └── _reviewers.blade.php
│ │ │ │ ├── locked.blade.php
│ │ │ │ ├── unlocked.blade.php
│ │ │ │ ├── labeled.blade.php
│ │ │ │ ├── assigned.blade.php
│ │ │ │ ├── unassigned.blade.php
│ │ │ │ ├── unlabeled.blade.php
│ │ │ │ ├── opened.blade.php
│ │ │ │ ├── reopened.blade.php
│ │ │ │ └── closed.blade.php
│ │ │ ├── ping
│ │ │ │ └── default.blade.php
│ │ │ ├── team
│ │ │ │ ├── deleted.blade.php
│ │ │ │ ├── edited.blade.php
│ │ │ │ ├── created.blade.php
│ │ │ │ ├── removed_from_repository.blade.php
│ │ │ │ └── added_to_repository.blade.php
│ │ │ ├── meta
│ │ │ │ └── deleted.blade.php
│ │ │ ├── issues
│ │ │ │ ├── closed.blade.php
│ │ │ │ ├── deleted.blade.php
│ │ │ │ ├── locked.blade.php
│ │ │ │ ├── pinned.blade.php
│ │ │ │ ├── unlocked.blade.php
│ │ │ │ ├── unpinned.blade.php
│ │ │ │ ├── opened.blade.php
│ │ │ │ ├── reopened.blade.php
│ │ │ │ └── edited.blade.php
│ │ │ ├── team_add
│ │ │ │ └── default.blade.php
│ │ │ ├── workflow_run
│ │ │ │ ├── requested.blade.php
│ │ │ │ └── completed.blade.php
│ │ │ ├── pull_request_review
│ │ │ │ ├── submitted.blade.php
│ │ │ │ └── dismissed.blade.php
│ │ │ ├── issue_comment
│ │ │ │ ├── deleted.blade.php
│ │ │ │ ├── edited.blade.php
│ │ │ │ └── created.blade.php
│ │ │ └── push
│ │ │ │ └── default.blade.php
│ │ └── shared
│ │ │ └── partials
│ │ │ ├── github
│ │ │ ├── _body.blade.php
│ │ │ └── _assignees.blade.php
│ │ │ └── gitlab
│ │ │ ├── _assignees.blade.php
│ │ │ └── _body.blade.php
│ └── globals
│ │ └── access_denied.blade.php
└── images
│ └── telegram-git-notifier-laravel.png
├── lang
├── de
│ ├── tools
│ │ ├── settings.php
│ │ ├── id.php
│ │ ├── token.php
│ │ ├── set_menu_cmd.php
│ │ ├── server.php
│ │ ├── custom_event_action.php
│ │ ├── about.php
│ │ ├── start.php
│ │ ├── custom_event.php
│ │ ├── menu.php
│ │ └── usage.php
│ ├── events
│ │ ├── gitlab
│ │ │ ├── pipeline.php
│ │ │ ├── job.php
│ │ │ ├── tag_push.php
│ │ │ ├── feature_flag.php
│ │ │ ├── wiki_page.php
│ │ │ ├── push.php
│ │ │ ├── release.php
│ │ │ ├── note.php
│ │ │ ├── issues.php
│ │ │ └── merge_request.php
│ │ ├── github
│ │ │ ├── watch.php
│ │ │ ├── team_add.php
│ │ │ ├── ping.php
│ │ │ ├── meta.php
│ │ │ ├── push.php
│ │ │ ├── star.php
│ │ │ ├── pull_request_review.php
│ │ │ ├── deploy_key.php
│ │ │ ├── issue_comment.php
│ │ │ ├── workflow_job.php
│ │ │ ├── branch_protection_rule.php
│ │ │ ├── label.php
│ │ │ ├── workflow_run.php
│ │ │ ├── team.php
│ │ │ ├── pull_request.php
│ │ │ └── issues.php
│ │ └── shared
│ │ │ ├── gitlab.php
│ │ │ └── github.php
│ ├── globals
│ │ └── access_denied.php
│ └── app.php
├── en
│ ├── tools
│ │ ├── settings.php
│ │ ├── id.php
│ │ ├── token.php
│ │ ├── set_menu_cmd.php
│ │ ├── server.php
│ │ ├── custom_event_action.php
│ │ ├── about.php
│ │ ├── start.php
│ │ ├── custom_event.php
│ │ ├── menu.php
│ │ └── usage.php
│ ├── events
│ │ ├── gitlab
│ │ │ ├── pipeline.php
│ │ │ ├── job.php
│ │ │ ├── tag_push.php
│ │ │ ├── feature_flag.php
│ │ │ ├── wiki_page.php
│ │ │ ├── push.php
│ │ │ ├── release.php
│ │ │ ├── note.php
│ │ │ ├── issues.php
│ │ │ └── merge_request.php
│ │ ├── github
│ │ │ ├── watch.php
│ │ │ ├── team_add.php
│ │ │ ├── ping.php
│ │ │ ├── meta.php
│ │ │ ├── push.php
│ │ │ ├── star.php
│ │ │ ├── pull_request_review.php
│ │ │ ├── deploy_key.php
│ │ │ ├── issue_comment.php
│ │ │ ├── workflow_job.php
│ │ │ ├── branch_protection_rule.php
│ │ │ ├── label.php
│ │ │ ├── workflow_run.php
│ │ │ ├── team.php
│ │ │ ├── pull_request.php
│ │ │ └── issues.php
│ │ └── shared
│ │ │ ├── gitlab.php
│ │ │ └── github.php
│ ├── globals
│ │ └── access_denied.php
│ └── app.php
├── ja
│ ├── tools
│ │ ├── settings.php
│ │ ├── id.php
│ │ ├── token.php
│ │ ├── set_menu_cmd.php
│ │ ├── server.php
│ │ ├── custom_event_action.php
│ │ ├── about.php
│ │ ├── start.php
│ │ ├── custom_event.php
│ │ ├── menu.php
│ │ └── usage.php
│ ├── events
│ │ ├── gitlab
│ │ │ ├── pipeline.php
│ │ │ ├── job.php
│ │ │ ├── tag_push.php
│ │ │ ├── feature_flag.php
│ │ │ ├── wiki_page.php
│ │ │ ├── push.php
│ │ │ ├── release.php
│ │ │ ├── note.php
│ │ │ ├── issues.php
│ │ │ └── merge_request.php
│ │ ├── github
│ │ │ ├── watch.php
│ │ │ ├── team_add.php
│ │ │ ├── ping.php
│ │ │ ├── meta.php
│ │ │ ├── push.php
│ │ │ ├── star.php
│ │ │ ├── pull_request_review.php
│ │ │ ├── deploy_key.php
│ │ │ ├── issue_comment.php
│ │ │ ├── workflow_job.php
│ │ │ ├── branch_protection_rule.php
│ │ │ ├── label.php
│ │ │ ├── workflow_run.php
│ │ │ ├── team.php
│ │ │ ├── pull_request.php
│ │ │ └── issues.php
│ │ └── shared
│ │ │ ├── gitlab.php
│ │ │ └── github.php
│ ├── globals
│ │ └── access_denied.php
│ └── app.php
└── vi
│ ├── tools
│ ├── settings.php
│ ├── id.php
│ ├── token.php
│ ├── set_menu_cmd.php
│ ├── server.php
│ ├── custom_event_action.php
│ ├── about.php
│ ├── start.php
│ ├── custom_event.php
│ ├── menu.php
│ └── usage.php
│ ├── events
│ ├── gitlab
│ │ ├── pipeline.php
│ │ ├── job.php
│ │ ├── tag_push.php
│ │ ├── feature_flag.php
│ │ ├── push.php
│ │ ├── wiki_page.php
│ │ ├── release.php
│ │ ├── note.php
│ │ ├── issues.php
│ │ └── merge_request.php
│ ├── github
│ │ ├── watch.php
│ │ ├── team_add.php
│ │ ├── ping.php
│ │ ├── meta.php
│ │ ├── push.php
│ │ ├── star.php
│ │ ├── pull_request_review.php
│ │ ├── deploy_key.php
│ │ ├── issue_comment.php
│ │ ├── workflow_job.php
│ │ ├── branch_protection_rule.php
│ │ ├── label.php
│ │ ├── workflow_run.php
│ │ ├── team.php
│ │ ├── pull_request.php
│ │ └── issues.php
│ └── shared
│ │ ├── gitlab.php
│ │ └── github.php
│ ├── globals
│ └── access_denied.php
│ └── app.php
├── tests
└── IntegrationTest.php
├── phpstan.neon.dist
├── .editorconfig
├── .gitignore
├── src
├── Traits
│ └── Markup.php
├── Commands
│ ├── SetWebhook.php
│ └── ChangeOwnerConfigJson.php
├── Http
│ └── Actions
│ │ ├── WebhookAction.php
│ │ └── IndexAction.php
├── Services
│ ├── WebhookService.php
│ └── NotificationService.php
└── Providers
│ └── TelegramGitNotifierServiceProvider.php
├── phpunit.xml
├── .scrutinizer.yml
├── LICENSE
├── phpstan-baseline.neon
├── routes
└── bot.php
├── .php-cs-fixer.dist.php
├── composer.json
└── config
└── telegram-git-notifier.php
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: [tanhongit]
2 |
--------------------------------------------------------------------------------
/.styleci.yml:
--------------------------------------------------------------------------------
1 | preset: laravel
2 |
3 | disabled:
4 | - not_operator_with_successor_space
--------------------------------------------------------------------------------
/resources/views/tools/settings.blade.php:
--------------------------------------------------------------------------------
1 | {!! __('tg-notifier::tools/settings.title') !!} 🤖
2 |
--------------------------------------------------------------------------------
/lang/de/tools/settings.php:
--------------------------------------------------------------------------------
1 | 'Settings for your bot',
5 | ];
6 |
--------------------------------------------------------------------------------
/lang/en/tools/settings.php:
--------------------------------------------------------------------------------
1 | 'Settings for your bot',
5 | ];
6 |
--------------------------------------------------------------------------------
/lang/ja/tools/settings.php:
--------------------------------------------------------------------------------
1 | 'Settings for your bot',
5 | ];
6 |
--------------------------------------------------------------------------------
/lang/vi/tools/settings.php:
--------------------------------------------------------------------------------
1 | 'Settings for your bot',
5 | ];
6 |
--------------------------------------------------------------------------------
/lang/de/tools/id.php:
--------------------------------------------------------------------------------
1 | 'Your id is :chat_id',
5 | ];
6 |
--------------------------------------------------------------------------------
/lang/en/tools/id.php:
--------------------------------------------------------------------------------
1 | 'Your id is :chat_id',
5 | ];
6 |
--------------------------------------------------------------------------------
/lang/ja/tools/id.php:
--------------------------------------------------------------------------------
1 | 'Your id is :chat_id',
5 | ];
6 |
--------------------------------------------------------------------------------
/lang/vi/tools/id.php:
--------------------------------------------------------------------------------
1 | 'Your id is :chat_id',
5 | ];
6 |
--------------------------------------------------------------------------------
/lang/de/events/gitlab/pipeline.php:
--------------------------------------------------------------------------------
1 | 'Pipeline Status Update',
5 | ];
6 |
--------------------------------------------------------------------------------
/lang/en/events/gitlab/pipeline.php:
--------------------------------------------------------------------------------
1 | 'Pipeline Status Update',
5 | ];
6 |
--------------------------------------------------------------------------------
/lang/ja/events/gitlab/pipeline.php:
--------------------------------------------------------------------------------
1 | 'Pipeline Status Update',
5 | ];
6 |
--------------------------------------------------------------------------------
/lang/de/tools/token.php:
--------------------------------------------------------------------------------
1 | 'This bot token is: :token',
5 | ];
6 |
--------------------------------------------------------------------------------
/lang/en/tools/token.php:
--------------------------------------------------------------------------------
1 | 'This bot token is: :token',
5 | ];
6 |
--------------------------------------------------------------------------------
/lang/ja/tools/token.php:
--------------------------------------------------------------------------------
1 | 'This bot token is: :token',
5 | ];
6 |
--------------------------------------------------------------------------------
/lang/vi/events/gitlab/pipeline.php:
--------------------------------------------------------------------------------
1 | 'Cập nhật trạng thái Pipeline',
5 | ];
6 |
--------------------------------------------------------------------------------
/lang/vi/tools/token.php:
--------------------------------------------------------------------------------
1 | 'This bot token is: :token',
5 | ];
6 |
--------------------------------------------------------------------------------
/lang/de/events/gitlab/job.php:
--------------------------------------------------------------------------------
1 | 'Update Job Status',
5 | 'name' => 'Job Name',
6 | ];
7 |
--------------------------------------------------------------------------------
/lang/en/events/gitlab/job.php:
--------------------------------------------------------------------------------
1 | 'Update Job Status',
5 | 'name' => 'Job Name',
6 | ];
7 |
--------------------------------------------------------------------------------
/lang/ja/events/gitlab/job.php:
--------------------------------------------------------------------------------
1 | 'Update Job Status',
5 | 'name' => 'Job Name',
6 | ];
7 |
--------------------------------------------------------------------------------
/lang/vi/events/gitlab/job.php:
--------------------------------------------------------------------------------
1 | 'Cập nhật trạng thái của Job',
5 | 'name' => 'Tên Job',
6 | ];
7 |
--------------------------------------------------------------------------------
/resources/views/tools/id.blade.php:
--------------------------------------------------------------------------------
1 | {!! __('tg-notifier::tools/id.title', ['chat_id' => config('telegram-git-notifier.bot.chat_id')]) !!}
2 |
--------------------------------------------------------------------------------
/resources/views/tools/token.blade.php:
--------------------------------------------------------------------------------
1 | {!! __('tg-notifier::tools/token.title', ['token' => config('telegram-git-notifier.bot.token')]) !!}
2 |
--------------------------------------------------------------------------------
/resources/views/tools/about.blade.php:
--------------------------------------------------------------------------------
1 | {!! __('tg-notifier::tools/about.title') !!}
2 |
3 | {!! __('tg-notifier::tools/about.description') !!}
4 |
--------------------------------------------------------------------------------
/resources/images/telegram-git-notifier-laravel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cslant/laravel-telegram-git-notifier/HEAD/resources/images/telegram-git-notifier-laravel.png
--------------------------------------------------------------------------------
/resources/views/tools/set_menu_cmd.blade.php:
--------------------------------------------------------------------------------
1 | {!! __('tg-notifier::tools/set_menu_cmd.title') !!}
2 |
3 | {!! __('tg-notifier::tools/set_menu_cmd.restartMessage') !!}
4 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/emoji/default.blade.php:
--------------------------------------------------------------------------------
1 |
8 | Need to implement this view
9 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/deployment/default.blade.php:
--------------------------------------------------------------------------------
1 |
8 | Need to implement this view
9 |
--------------------------------------------------------------------------------
/lang/de/tools/set_menu_cmd.php:
--------------------------------------------------------------------------------
1 | '✅ Menu button set successfully!',
5 | 'restartMessage' => 'Please restart the bot to apply the changes.',
6 | ];
7 |
--------------------------------------------------------------------------------
/lang/en/tools/set_menu_cmd.php:
--------------------------------------------------------------------------------
1 | '✅ Menu button set successfully!',
5 | 'restartMessage' => 'Please restart the bot to apply the changes.',
6 | ];
7 |
--------------------------------------------------------------------------------
/lang/ja/events/github/watch.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => '(時計) 新しいスター 🌟 from :repo',
6 | 'watcher' => 'ウォッチャー',
7 | ],
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/ja/tools/set_menu_cmd.php:
--------------------------------------------------------------------------------
1 | '✅ Menu button set successfully!',
5 | 'restartMessage' => 'Please restart the bot to apply the changes.',
6 | ];
7 |
--------------------------------------------------------------------------------
/lang/vi/tools/set_menu_cmd.php:
--------------------------------------------------------------------------------
1 | '✅ Menu button set successfully!',
5 | 'restartMessage' => 'Please restart the bot to apply the changes.',
6 | ];
7 |
--------------------------------------------------------------------------------
/lang/en/events/github/watch.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => '(Watch) New Star 🌟 from :repo',
6 | 'watcher' => 'Watcher',
7 | ],
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/vi/events/gitlab/tag_push.php:
--------------------------------------------------------------------------------
1 | 'Một thẻ mới đã được đẩy vào dự án :repo',
5 | 'name' => 'Tên thẻ',
6 | 'pusher' => 'Được đẩy bởi',
7 | ];
8 |
--------------------------------------------------------------------------------
/lang/vi/events/github/watch.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => '(Watch) Dấu sao mới 🌟 từ :repo',
6 | 'watcher' => 'Người theo dõi',
7 | ],
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/de/events/github/watch.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => '(betrachten) Neuer Stern 🌟 von :repo',
6 | 'watcher' => 'Betrachter',
7 | ],
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/de/events/gitlab/tag_push.php:
--------------------------------------------------------------------------------
1 | 'A new tag has been pushed to the project :repo',
5 | 'name' => 'Tag Name',
6 | 'pusher' => ' Pushed by',
7 | ];
8 |
--------------------------------------------------------------------------------
/lang/en/events/gitlab/tag_push.php:
--------------------------------------------------------------------------------
1 | 'A new tag has been pushed to the project :repo',
5 | 'name' => 'Tag Name',
6 | 'pusher' => ' Pushed by',
7 | ];
8 |
--------------------------------------------------------------------------------
/lang/ja/events/gitlab/tag_push.php:
--------------------------------------------------------------------------------
1 | 'A new tag has been pushed to the project :repo',
5 | 'name' => 'Tag Name',
6 | 'pusher' => ' Pushed by',
7 | ];
8 |
--------------------------------------------------------------------------------
/lang/de/events/github/team_add.php:
--------------------------------------------------------------------------------
1 | 'Team Added successfully',
5 | 'organization' => 'Organization',
6 | 'full_name' => 'Repository',
7 | 'team' => 'Team',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/de/events/shared/gitlab.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Content',
6 | ],
7 | '_assignee' => [
8 | 'title' => '🙋 Assignee: ',
9 | ],
10 | ];
11 |
--------------------------------------------------------------------------------
/lang/en/events/github/team_add.php:
--------------------------------------------------------------------------------
1 | 'Team Added successfully',
5 | 'organization' => 'Organization',
6 | 'full_name' => 'Repository',
7 | 'team' => 'Team',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/en/events/shared/gitlab.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Content',
6 | ],
7 | '_assignee' => [
8 | 'title' => '🙋 Assignee: ',
9 | ],
10 | ];
11 |
--------------------------------------------------------------------------------
/lang/ja/events/github/team_add.php:
--------------------------------------------------------------------------------
1 | 'Team Added successfully',
5 | 'organization' => 'Organization',
6 | 'full_name' => 'Repository',
7 | 'team' => 'Team',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/ja/events/shared/gitlab.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Content',
6 | ],
7 | '_assignee' => [
8 | 'title' => '🙋 Assignee: ',
9 | ],
10 | ];
11 |
--------------------------------------------------------------------------------
/lang/vi/events/github/team_add.php:
--------------------------------------------------------------------------------
1 | 'Team Added successfully',
5 | 'organization' => 'Organization',
6 | 'full_name' => 'Repository',
7 | 'team' => 'Team',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/vi/events/shared/gitlab.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Content',
6 | ],
7 | '_assignee' => [
8 | 'title' => '🙋 Assignee: ',
9 | ],
10 | ];
11 |
--------------------------------------------------------------------------------
/tests/IntegrationTest.php:
--------------------------------------------------------------------------------
1 | 'Server Address : :link',
5 | 'name' => 'Server Name : :link',
6 | 'port' => 'Server Port : :link',
7 | 'software' => 'Server Software : :link',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/en/tools/server.php:
--------------------------------------------------------------------------------
1 | 'Server Address : :link',
5 | 'name' => 'Server Name : :link',
6 | 'port' => 'Server Port : :link',
7 | 'software' => 'Server Software : :link',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/ja/tools/server.php:
--------------------------------------------------------------------------------
1 | 'Server Address : :link',
5 | 'name' => 'Server Name : :link',
6 | 'port' => 'Server Port : :link',
7 | 'software' => 'Server Software : :link',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/vi/tools/server.php:
--------------------------------------------------------------------------------
1 | 'Server Address : :link',
5 | 'name' => 'Server Name : :link',
6 | 'port' => 'Server Port : :link',
7 | 'software' => 'Server Software : :link',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/de/events/github/ping.php:
--------------------------------------------------------------------------------
1 | 'Connection Successful',
5 | 'organization' => 'Organization',
6 | 'full_name' => 'Repository',
7 | 'sender' => 'Sender (triggered the event)',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/en/events/github/ping.php:
--------------------------------------------------------------------------------
1 | 'Connection Successful',
5 | 'organization' => 'Organization',
6 | 'full_name' => 'Repository',
7 | 'sender' => 'Sender (triggered the event)',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/ja/events/github/ping.php:
--------------------------------------------------------------------------------
1 | 'Connection Successful',
5 | 'organization' => 'Organization',
6 | 'full_name' => 'Repository',
7 | 'sender' => 'Sender (triggered the event)',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/vi/events/github/ping.php:
--------------------------------------------------------------------------------
1 | 'Connection Successful',
5 | 'organization' => 'Organization',
6 | 'full_name' => 'Repository',
7 | 'sender' => 'Sender (triggered the event)',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/de/tools/custom_event_action.php:
--------------------------------------------------------------------------------
1 | 'Setting actions for the :event event :platformIcon.',
5 | 'actionPrompt' => 'Please select an action of this event to enable or disable notifications:',
6 | ];
7 |
--------------------------------------------------------------------------------
/lang/en/tools/custom_event_action.php:
--------------------------------------------------------------------------------
1 | 'Setting actions for the :event event :platformIcon.',
5 | 'actionPrompt' => 'Please select an action of this event to enable or disable notifications:',
6 | ];
7 |
--------------------------------------------------------------------------------
/lang/ja/tools/custom_event_action.php:
--------------------------------------------------------------------------------
1 | 'Setting actions for the :event event :platformIcon.',
5 | 'actionPrompt' => 'Please select an action of this event to enable or disable notifications:',
6 | ];
7 |
--------------------------------------------------------------------------------
/lang/vi/tools/custom_event_action.php:
--------------------------------------------------------------------------------
1 | 'Setting actions for the :event event :platformIcon.',
5 | 'actionPrompt' => 'Please select an action of this event to enable or disable notifications:',
6 | ];
7 |
--------------------------------------------------------------------------------
/lang/de/tools/about.php:
--------------------------------------------------------------------------------
1 | 'Thanks for using our bot.',
5 | 'description' => 'The bot is designed to send notifications based on GitHub and GitLab events from your repo instantly to your Telegram account.',
6 | ];
7 |
--------------------------------------------------------------------------------
/lang/en/tools/about.php:
--------------------------------------------------------------------------------
1 | 'Thanks for using our bot.',
5 | 'description' => 'The bot is designed to send notifications based on GitHub and GitLab events from your repo instantly to your Telegram account.',
6 | ];
7 |
--------------------------------------------------------------------------------
/lang/ja/events/github/meta.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Webhook 削除',
6 | 'organization' => '組織',
7 | 'full_name' => 'リポジトリ',
8 | 'sender' => '送信者(イベントのトリガー)',
9 | ],
10 | ];
11 |
--------------------------------------------------------------------------------
/lang/ja/tools/about.php:
--------------------------------------------------------------------------------
1 | 'Thanks for using our bot.',
5 | 'description' => 'The bot is designed to send notifications based on GitHub and GitLab events from your repo instantly to your Telegram account.',
6 | ];
7 |
--------------------------------------------------------------------------------
/lang/vi/tools/about.php:
--------------------------------------------------------------------------------
1 | 'Thanks for using our bot.',
5 | 'description' => 'The bot is designed to send notifications based on GitHub and GitLab events from your repo instantly to your Telegram account.',
6 | ];
7 |
--------------------------------------------------------------------------------
/phpstan.neon.dist:
--------------------------------------------------------------------------------
1 | includes:
2 | - phpstan-baseline.neon
3 |
4 | parameters:
5 | level: 9
6 | paths:
7 | - src
8 | - routes
9 | tmpDir: build/phpstan
10 | checkOctaneCompatibility: true
11 | checkModelProperties: true
12 |
--------------------------------------------------------------------------------
/lang/de/globals/access_denied.php:
--------------------------------------------------------------------------------
1 | 'Access Denied to Bot',
5 | 'chat_id' => 'Chat ID: :chatId ',
6 | 'message' => 'Please contact the administrator for further information, Thank You..',
7 | ];
8 |
--------------------------------------------------------------------------------
/lang/en/globals/access_denied.php:
--------------------------------------------------------------------------------
1 | 'Access Denied to Bot',
5 | 'chat_id' => 'Chat ID: :chatId ',
6 | 'message' => 'Please contact the administrator for further information, Thank You..',
7 | ];
8 |
--------------------------------------------------------------------------------
/lang/ja/globals/access_denied.php:
--------------------------------------------------------------------------------
1 | 'Access Denied to Bot',
5 | 'chat_id' => 'Chat ID: :chatId ',
6 | 'message' => 'Please contact the administrator for further information, Thank You..',
7 | ];
8 |
--------------------------------------------------------------------------------
/lang/vi/globals/access_denied.php:
--------------------------------------------------------------------------------
1 | 'Access Denied to Bot',
5 | 'chat_id' => 'Chat ID: :chatId ',
6 | 'message' => 'Please contact the administrator for further information, Thank You..',
7 | ];
8 |
--------------------------------------------------------------------------------
/lang/vi/events/github/meta.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Webhook đã được xóa',
6 | 'organization' => 'Tổ chức',
7 | 'full_name' => 'Kho lưu trữ',
8 | 'sender' => 'Người thực hiện sự kiện',
9 | ],
10 | ];
11 |
--------------------------------------------------------------------------------
/lang/de/events/shared/github.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Content',
6 | ],
7 | '_assignee' => [
8 | 'title' => 'Assignee',
9 | ],
10 | '_description' => [
11 | 'title' => 'Description',
12 | ],
13 | ];
14 |
--------------------------------------------------------------------------------
/lang/en/events/github/meta.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Webhook Deleted',
6 | 'organization' => 'Organization',
7 | 'full_name' => 'Repository',
8 | 'sender' => 'Sender (triggered the event)',
9 | ],
10 | ];
11 |
--------------------------------------------------------------------------------
/lang/en/events/shared/github.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Content',
6 | ],
7 | '_assignee' => [
8 | 'title' => 'Assignee',
9 | ],
10 | '_description' => [
11 | 'title' => 'Description',
12 | ],
13 | ];
14 |
--------------------------------------------------------------------------------
/lang/ja/events/shared/github.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Content',
6 | ],
7 | '_assignee' => [
8 | 'title' => 'Assignee',
9 | ],
10 | '_description' => [
11 | 'title' => 'Description',
12 | ],
13 | ];
14 |
--------------------------------------------------------------------------------
/lang/vi/events/shared/github.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Nội dung',
6 | ],
7 | '_assignee' => [
8 | 'title' => 'Người được giao',
9 | ],
10 | '_description' => [
11 | 'title' => 'Mô tả',
12 | ],
13 | ];
14 |
--------------------------------------------------------------------------------
/lang/de/events/github/meta.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Webhook gelöscht',
6 | 'organization' => 'Organisation',
7 | 'full_name' => 'Repository',
8 | 'sender' => 'Sender (der das Ereignis ausgelöst hat)',
9 | ],
10 | ];
11 |
--------------------------------------------------------------------------------
/lang/de/events/github/push.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => ':count new :noun to :repo::branch',
6 | 'commit' => '[:commit] :commit_message - by :commit_by',
7 | 'pusher' => 'Pushed by',
8 | ],
9 | ];
10 |
--------------------------------------------------------------------------------
/lang/en/events/github/push.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => ':count new :noun to :repo::branch',
6 | 'commit' => '[:commit] :commit_message - by :commit_by',
7 | 'pusher' => 'Pushed by',
8 | ],
9 | ];
10 |
--------------------------------------------------------------------------------
/lang/ja/events/github/push.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => ':count new :noun to :repo::branch',
6 | 'commit' => '[:commit] :commit_message - by :commit_by',
7 | 'pusher' => 'Pushed by',
8 | ],
9 | ];
10 |
--------------------------------------------------------------------------------
/lang/vi/events/github/push.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => ':count new :noun to :repo::branch',
6 | 'commit' => '[:commit] :commit_message - by :commit_by',
7 | 'pusher' => 'Pushed by',
8 | ],
9 | ];
10 |
--------------------------------------------------------------------------------
/lang/de/events/gitlab/feature_flag.php:
--------------------------------------------------------------------------------
1 | [
5 | 'enabled' => 'Feature Flag Enabled :flag_tag by :user_tag',
6 | 'disabled' => 'Feature Flag Disabled :flag_tag by :user_tag',
7 | ],
8 | 'name' => 'Name: :flag_name',
9 | ];
10 |
--------------------------------------------------------------------------------
/lang/de/tools/start.php:
--------------------------------------------------------------------------------
1 | ':appName',
5 | 'firstName' => 'Hey :firstName,',
6 | 'notification' => 'I can send you notifications from your 🦑GitHub or 🦊GitLab Repository instantly to your Telegram.
7 | Use /menu for more options.',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/en/events/gitlab/feature_flag.php:
--------------------------------------------------------------------------------
1 | [
5 | 'enabled' => 'Feature Flag Enabled :flag_tag by :user_tag',
6 | 'disabled' => 'Feature Flag Disabled :flag_tag by :user_tag',
7 | ],
8 | 'name' => 'Name: :flag_name',
9 | ];
10 |
--------------------------------------------------------------------------------
/lang/en/tools/start.php:
--------------------------------------------------------------------------------
1 | ':appName',
5 | 'firstName' => 'Hey :firstName,',
6 | 'notification' => 'I can send you notifications from your 🦑GitHub or 🦊GitLab Repository instantly to your Telegram.
7 | Use /menu for more options.',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/ja/events/gitlab/feature_flag.php:
--------------------------------------------------------------------------------
1 | [
5 | 'enabled' => 'Feature Flag Enabled :flag_tag by :user_tag',
6 | 'disabled' => 'Feature Flag Disabled :flag_tag by :user_tag',
7 | ],
8 | 'name' => 'Name: :flag_name',
9 | ];
10 |
--------------------------------------------------------------------------------
/lang/ja/tools/start.php:
--------------------------------------------------------------------------------
1 | ':appName',
5 | 'firstName' => 'Hey :firstName,',
6 | 'notification' => 'I can send you notifications from your 🦑GitHub or 🦊GitLab Repository instantly to your Telegram.
7 | Use /menu for more options.',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/vi/tools/start.php:
--------------------------------------------------------------------------------
1 | ':appName',
5 | 'firstName' => 'Hey :firstName,',
6 | 'notification' => 'I can send you notifications from your 🦑GitHub or 🦊GitLab Repository instantly to your Telegram.
7 | Use /menu for more options.',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/de/events/github/star.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'New Star 🌟 from',
6 | 'seeder' => 'Starer',
7 | ],
8 |
9 | 'deleted' => [
10 | 'title' => 'Star 🌟 Removed from',
11 | 'remover' => 'Remover',
12 | ],
13 | ];
14 |
--------------------------------------------------------------------------------
/lang/en/events/github/star.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'New Star 🌟 from',
6 | 'seeder' => 'Starer',
7 | ],
8 |
9 | 'deleted' => [
10 | 'title' => 'Star 🌟 Removed from',
11 | 'remover' => 'Remover',
12 | ],
13 | ];
14 |
--------------------------------------------------------------------------------
/lang/ja/events/github/star.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'New Star 🌟 from',
6 | 'seeder' => 'Starer',
7 | ],
8 |
9 | 'deleted' => [
10 | 'title' => 'Star 🌟 Removed from',
11 | 'remover' => 'Remover',
12 | ],
13 | ];
14 |
--------------------------------------------------------------------------------
/lang/vi/events/gitlab/feature_flag.php:
--------------------------------------------------------------------------------
1 | [
5 | 'enabled' => 'Đã bật cờ tính năng :flag_tag bởi :user_tag',
6 | 'disabled' => 'Cờ tính năng bị vô hiệu hóa :flag_tag bởi :user_tag',
7 | ],
8 | 'name' => 'Tên: :flag_name',
9 | ];
10 |
--------------------------------------------------------------------------------
/lang/ja/tools/custom_event.php:
--------------------------------------------------------------------------------
1 | 'Go to check the :link for more information about events.',
5 | 'instruction' => 'Click and configure child events if the option has the ⚙ icon.',
6 | 'eventSelection' => 'And select an event to enable or disable notifications:',
7 | ];
8 |
--------------------------------------------------------------------------------
/lang/vi/tools/custom_event.php:
--------------------------------------------------------------------------------
1 | 'Go to check the :link for more information about events.',
5 | 'instruction' => 'Click and configure child events if the option has the ⚙ icon.',
6 | 'eventSelection' => 'And select an event to enable or disable notifications:',
7 | ];
8 |
--------------------------------------------------------------------------------
/lang/vi/events/github/star.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Nhận dấu sao mới 🌟 từ',
6 | 'seeder' => 'Người gắn dấu sao',
7 | ],
8 |
9 | 'deleted' => [
10 | 'title' => 'Dấu sao đã bị hủy từ',
11 | 'remover' => 'Người hủy bỏ',
12 | ],
13 | ];
14 |
--------------------------------------------------------------------------------
/lang/de/events/gitlab/wiki_page.php:
--------------------------------------------------------------------------------
1 | [
5 | 'create' => 'Wiki Page Created - :repo by :user',
6 | 'update' => 'Wiki Page Updated - :repo by :user',
7 | 'delete' => 'Wiki Page Deleted - :repo by :user',
8 | ],
9 | 'name' => 'Page Name',
10 | ];
11 |
--------------------------------------------------------------------------------
/lang/en/events/gitlab/wiki_page.php:
--------------------------------------------------------------------------------
1 | [
5 | 'create' => 'Wiki Page Created - :repo by :user',
6 | 'update' => 'Wiki Page Updated - :repo by :user',
7 | 'delete' => 'Wiki Page Deleted - :repo by :user',
8 | ],
9 | 'name' => 'Page Name',
10 | ];
11 |
--------------------------------------------------------------------------------
/lang/ja/events/gitlab/wiki_page.php:
--------------------------------------------------------------------------------
1 | [
5 | 'create' => 'Wiki Page Created - :repo by :user',
6 | 'update' => 'Wiki Page Updated - :repo by :user',
7 | 'delete' => 'Wiki Page Deleted - :repo by :user',
8 | ],
9 | 'name' => 'Page Name',
10 | ];
11 |
--------------------------------------------------------------------------------
/lang/de/events/gitlab/push.php:
--------------------------------------------------------------------------------
1 | ':count new :noun to :repo::branch',
5 | 'commit' => '[:commit] :commit_message - by :commit_by',
6 | 'pusher' => 'Pushed by : :name',
7 | 'new_branch_title' => 'A new branch has been pushed to the project :repo',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/en/events/gitlab/push.php:
--------------------------------------------------------------------------------
1 | ':count new :noun to :repo::branch',
5 | 'commit' => '[:commit] :commit_message - by :commit_by',
6 | 'pusher' => 'Pushed by : :name',
7 | 'new_branch_title' => 'A new branch has been pushed to the project :repo',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/ja/events/gitlab/push.php:
--------------------------------------------------------------------------------
1 | ':count new :noun to :repo::branch',
5 | 'commit' => '[:commit] :commit_message - by :commit_by',
6 | 'pusher' => 'Pushed by : :name',
7 | 'new_branch_title' => 'A new branch has been pushed to the project :repo',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/vi/events/gitlab/push.php:
--------------------------------------------------------------------------------
1 | ':count :noun mới trong :repo::branch',
5 | 'commit' => '[:commit] :commit_message - bởi :commit_by',
6 | 'pusher' => 'Đẩy lên bởi: : :name',
7 | 'new_branch_title' => 'Một nhánh mới đã được tạo trong dự án :repo',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/de/events/gitlab/release.php:
--------------------------------------------------------------------------------
1 | [
5 | 'create' => 'Release Created - :repo by :user',
6 | 'update' => 'Release Updated - :repo by :user',
7 | 'delete' => 'Release Deleted - :repo by :user',
8 | ],
9 | 'tag' => 'Tag',
10 | 'name' => 'Release Name',
11 | ];
12 |
--------------------------------------------------------------------------------
/lang/de/tools/custom_event.php:
--------------------------------------------------------------------------------
1 | 'Go to check the :link for more information about events.',
5 | 'instruction' => 'Click and configure child events if the option has the ⚙ icon.',
6 | 'eventSelection' => 'And select an event to enable or disable notifications:',
7 | 'documentation' => 'documentation',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/en/events/gitlab/release.php:
--------------------------------------------------------------------------------
1 | [
5 | 'create' => 'Release Created - :repo by :user',
6 | 'update' => 'Release Updated - :repo by :user',
7 | 'delete' => 'Release Deleted - :repo by :user',
8 | ],
9 | 'tag' => 'Tag',
10 | 'name' => 'Release Name',
11 | ];
12 |
--------------------------------------------------------------------------------
/lang/en/tools/custom_event.php:
--------------------------------------------------------------------------------
1 | 'Go to check the :link for more information about events.',
5 | 'instruction' => 'Click and configure child events if the option has the ⚙ icon.',
6 | 'eventSelection' => 'And select an event to enable or disable notifications:',
7 | 'documentation' => 'documentation',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/ja/events/gitlab/release.php:
--------------------------------------------------------------------------------
1 | [
5 | 'create' => 'Release Created - :repo by :user',
6 | 'update' => 'Release Updated - :repo by :user',
7 | 'delete' => 'Release Deleted - :repo by :user',
8 | ],
9 | 'tag' => 'Tag',
10 | 'name' => 'Release Name',
11 | ];
12 |
--------------------------------------------------------------------------------
/lang/vi/events/gitlab/wiki_page.php:
--------------------------------------------------------------------------------
1 | [
5 | 'create' => 'Trang Wiki đã được tạo - :repo bởi :user',
6 | 'update' => 'Trang Wiki đã được cập nhật - :repo bởi :user',
7 | 'delete' => 'Trang Wiki đã được xoá - :repo bởi :user',
8 | ],
9 | 'name' => 'Tên trang',
10 | ];
11 |
--------------------------------------------------------------------------------
/resources/views/globals/access_denied.blade.php:
--------------------------------------------------------------------------------
1 |
7 | 🔒 {!! __('tg-notifier::globals/access_denied.title') !!} 🚫
8 |
9 | @if(!empty($chatId))
10 | 🛑 {!! __('tg-notifier::globals/access_denied.chat_id', ['chatId' => $chatId]) !!}
11 | @endif
12 | {!! __('tg-notifier::globals/access_denied.message') !!}
13 |
--------------------------------------------------------------------------------
/resources/views/tools/start.blade.php:
--------------------------------------------------------------------------------
1 |
7 | 🙋🏻 {!! __('tg-notifier::tools/start.title', ['appName' => config('telegram-git-notifier.app.name')]) !!} 🤓
8 |
9 | {!! __('tg-notifier::tools/start.firstName', ['firstName' => $first_name]) !!}
10 |
11 | {!! __('tg-notifier::tools/start.notification') !!}
12 |
--------------------------------------------------------------------------------
/lang/vi/events/gitlab/release.php:
--------------------------------------------------------------------------------
1 | [
5 | 'create' => 'Đã tạo bản phát hành - :repo bởi :user',
6 | 'update' => 'Đã cập nhật bản phát hành - :repo bởi :user',
7 | 'delete' => 'Đã xoá bản phát hành - :repo bởi :user',
8 | ],
9 | 'tag' => 'Thẻ',
10 | 'name' => 'Tên phát hành',
11 | ];
12 |
--------------------------------------------------------------------------------
/lang/de/events/github/pull_request_review.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Dismissed Pull Request Review Comment 💬 - :repo by :user',
6 | ],
7 | 'submitted' => [
8 | 'title' => 'New Pull Request Review Comment 💬 - :repo by :user',
9 | ],
10 | 'link' => 'Link: :review',
11 | 'name' => 'PR Name',
12 | ];
13 |
--------------------------------------------------------------------------------
/lang/en/events/github/pull_request_review.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Dismissed Pull Request Review Comment 💬 - :repo by :user',
6 | ],
7 | 'submitted' => [
8 | 'title' => 'New Pull Request Review Comment 💬 - :repo by :user',
9 | ],
10 | 'link' => 'Link: :review',
11 | 'name' => 'PR Name',
12 | ];
13 |
--------------------------------------------------------------------------------
/lang/ja/events/github/pull_request_review.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Dismissed Pull Request Review Comment 💬 - :repo by :user',
6 | ],
7 | 'submitted' => [
8 | 'title' => 'New Pull Request Review Comment 💬 - :repo by :user',
9 | ],
10 | 'link' => 'Link: :review',
11 | 'name' => 'PR Name',
12 | ];
13 |
--------------------------------------------------------------------------------
/lang/vi/events/github/pull_request_review.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Dismissed Pull Request Review Comment 💬 - :repo by :user',
6 | ],
7 | 'submitted' => [
8 | 'title' => 'New Pull Request Review Comment 💬 - :repo by :user',
9 | ],
10 | 'link' => 'Link: :review',
11 | 'name' => 'PR Name',
12 | ];
13 |
--------------------------------------------------------------------------------
/resources/views/events/github/star/created.blade.php:
--------------------------------------------------------------------------------
1 |
7 |
8 | 🎉 {!! __('tg-notifier::events/github/star.created.title') !!} 🦑{{ $payload->repository->full_name }}
9 |
10 | 👤 {!! __('tg-notifier::events/github/star.created.seeder') !!}: {{ $payload->sender->login }} 👀
11 |
--------------------------------------------------------------------------------
/resources/views/events/github/star/deleted.blade.php:
--------------------------------------------------------------------------------
1 |
7 |
8 | 🚫 {!! __('tg-notifier::events/github/star.deleted.title') !!} 🦑{{ $payload->repository->full_name }}
9 |
10 | 👤 {!! __('tg-notifier::events/github/star.deleted.remover') !!}: {{ $payload->sender->login }} 👀
11 |
--------------------------------------------------------------------------------
/resources/views/tools/menu.blade.php:
--------------------------------------------------------------------------------
1 |
7 |
8 | {{ __('tg-notifier::tools/menu.title') }} 🤖
9 |
10 |
11 | = $menuCommand['command'] ?> - = $menuCommand['description'] ?>
12 |
13 |
14 |
--------------------------------------------------------------------------------
/resources/views/tools/custom_event_action.blade.php:
--------------------------------------------------------------------------------
1 |
12 | {!! __('tg-notifier::tools/custom_event_action.title', ['event' => $event, 'platformIcon' => $platformIcon]) !!}
13 | {!! __('tg-notifier::tools/custom_event_action.actionPrompt') !!}
14 |
--------------------------------------------------------------------------------
/resources/views/events/github/watch/started.blade.php:
--------------------------------------------------------------------------------
1 |
7 |
8 | 🎉 {!! __('tg-notifier::events/github/watch.started.title', [
9 | 'repo' => "🦑{$payload->repository->full_name}"
10 | ]
11 | ) !!}
12 |
13 | 👤 {!! __('tg-notifier::events/github/watch.started.watcher') !!}: {{ $payload->sender->login }} 👀
14 |
--------------------------------------------------------------------------------
/lang/de/events/github/deploy_key.php:
--------------------------------------------------------------------------------
1 | 'Deploy Key',
5 | 'created' => [
6 | 'title' => 'Added Deploy Key ⚠️ from :repo by :user',
7 | 'message' => 'Please go to the setting deploy key to manage.',
8 | ],
9 | 'deleted' => [
10 | 'title' => 'Deploy Key Deleted 💬 from :repo by :user',
11 | 'message' => 'Please go to the setting deploy key to manage.',
12 | ],
13 | ];
14 |
--------------------------------------------------------------------------------
/lang/en/events/github/deploy_key.php:
--------------------------------------------------------------------------------
1 | 'Deploy Key',
5 | 'created' => [
6 | 'title' => 'Added Deploy Key ⚠️ from :repo by :user',
7 | 'message' => 'Please go to the setting deploy key to manage.',
8 | ],
9 | 'deleted' => [
10 | 'title' => 'Deploy Key Deleted 💬 from :repo by :user',
11 | 'message' => 'Please go to the setting deploy key to manage.',
12 | ],
13 | ];
14 |
--------------------------------------------------------------------------------
/lang/ja/events/github/deploy_key.php:
--------------------------------------------------------------------------------
1 | 'Deploy Key',
5 | 'created' => [
6 | 'title' => 'Added Deploy Key ⚠️ from :repo by :user',
7 | 'message' => 'Please go to the setting deploy key to manage.',
8 | ],
9 | 'deleted' => [
10 | 'title' => 'Deploy Key Deleted 💬 from :repo by :user',
11 | 'message' => 'Please go to the setting deploy key to manage.',
12 | ],
13 | ];
14 |
--------------------------------------------------------------------------------
/lang/vi/events/github/deploy_key.php:
--------------------------------------------------------------------------------
1 | 'Deploy Key',
5 | 'created' => [
6 | 'title' => 'Added Deploy Key ⚠️ from :repo by :user',
7 | 'message' => 'Please go to the setting deploy key to manage.',
8 | ],
9 | 'deleted' => [
10 | 'title' => 'Deploy Key Deleted 💬 from :repo by :user',
11 | 'message' => 'Please go to the setting deploy key to manage.',
12 | ],
13 | ];
14 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | ; This is the top-most EditorConfig file, which is not inherited by any other files.
2 | ; This file is used for unify the coding style for different editors and IDEs.
3 | ; More information at https://editorconfig.org
4 |
5 | root = true
6 |
7 | [*]
8 | charset = utf-8
9 | end_of_line = lf
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
13 |
14 | [*.yml]
15 | indent_style = space
16 |
17 | [*.json]
18 | indent_style = space
19 | indent_size = 2
20 |
--------------------------------------------------------------------------------
/resources/views/events/github/label/deleted.blade.php:
--------------------------------------------------------------------------------
1 |
7 |
8 | 🗑 {!! __('tg-notifier::events/github/label.deleted.title', [
9 | 'repo' => "🦑{$payload->repository->full_name}",
10 | 'user' => "@{$payload->sender->login}",
11 | ]
12 | ) !!}
13 |
14 | 🔖 {{ $payload->label->name }}
15 |
--------------------------------------------------------------------------------
/lang/de/events/github/issue_comment.php:
--------------------------------------------------------------------------------
1 | 'Issue Name',
5 | 'created' => [
6 | 'title' => 'New Issue Comment ⚠️ to :issue by :user',
7 | ],
8 | 'deleted' => [
9 | 'title' => 'Issue Comment Deleted 💬 from :issue by :user',
10 | ],
11 | 'edited' => [
12 | 'title' => 'Issue Comment Edited 💬 in :issue by :user',
13 | ],
14 | 'link' => 'Link to Comment',
15 | ];
16 |
--------------------------------------------------------------------------------
/lang/en/events/github/issue_comment.php:
--------------------------------------------------------------------------------
1 | 'Issue Name',
5 | 'created' => [
6 | 'title' => 'New Issue Comment ⚠️ to :issue by :user',
7 | ],
8 | 'deleted' => [
9 | 'title' => 'Issue Comment Deleted 💬 from :issue by :user',
10 | ],
11 | 'edited' => [
12 | 'title' => 'Issue Comment Edited 💬 in :issue by :user',
13 | ],
14 | 'link' => 'Link to Comment',
15 | ];
16 |
--------------------------------------------------------------------------------
/lang/ja/events/github/issue_comment.php:
--------------------------------------------------------------------------------
1 | 'Issue Name',
5 | 'created' => [
6 | 'title' => 'New Issue Comment ⚠️ to :issue by :user',
7 | ],
8 | 'deleted' => [
9 | 'title' => 'Issue Comment Deleted 💬 from :issue by :user',
10 | ],
11 | 'edited' => [
12 | 'title' => 'Issue Comment Edited 💬 in :issue by :user',
13 | ],
14 | 'link' => 'Link to Comment',
15 | ];
16 |
--------------------------------------------------------------------------------
/lang/vi/events/github/issue_comment.php:
--------------------------------------------------------------------------------
1 | 'Issue Name',
5 | 'created' => [
6 | 'title' => 'New Issue Comment ⚠️ to :issue by :user',
7 | ],
8 | 'deleted' => [
9 | 'title' => 'Issue Comment Deleted 💬 from :issue by :user',
10 | ],
11 | 'edited' => [
12 | 'title' => 'Issue Comment Edited 💬 in :issue by :user',
13 | ],
14 | 'link' => 'Link to Comment',
15 | ];
16 |
--------------------------------------------------------------------------------
/resources/views/events/github/branch_protection_rule/deleted.blade.php:
--------------------------------------------------------------------------------
1 | repository;
7 | ?>
8 |
9 | 🗑 {!! __('tg-notifier::events/github/branch_protection_rule.deleted.title', [
10 | 'repo' => "🦑$repository->full_name"
11 | ]
12 | ) !!}
13 |
14 | 🛡 {!! __('tg-notifier::events/github/branch_protection_rule.name') !!}: {{ $payload->rule->name }}
15 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for all configuration options:
4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5 |
6 | version: 2
7 | updates:
8 | - package-ecosystem: "github-actions"
9 | directory: "/"
10 | schedule:
11 | interval: "daily"
12 |
--------------------------------------------------------------------------------
/resources/views/events/shared/partials/github/_body.blade.php:
--------------------------------------------------------------------------------
1 | {$event}->body)) {
11 | $html = htmlentities(Str::limit($payload->{$event}->body));
12 | }
13 | ?>
14 | @if(!empty($html))
15 | 📖 {!! __('tg-notifier::events/shared/github._body.title') !!}:
16 | {!! $html !!}
17 | @endif
18 |
--------------------------------------------------------------------------------
/lang/de/events/gitlab/note.php:
--------------------------------------------------------------------------------
1 | [
5 | 'commit' => 'New Comment on Commit - :repo by :user',
6 | 'issue' => 'New Comment on Issue - :repo by :user',
7 | 'merge_request' => 'New Comment on Merge Request - :repo by :user',
8 | 'snippet' => 'New Comment on Snippet - :repo by :user',
9 | ],
10 | 'view_comment' => 'View Comment: :link',
11 | 'snippet_comment' => 'View Comment on Snippet',
12 | ];
13 |
--------------------------------------------------------------------------------
/lang/en/events/gitlab/note.php:
--------------------------------------------------------------------------------
1 | [
5 | 'commit' => 'New Comment on Commit - :repo by :user',
6 | 'issue' => 'New Comment on Issue - :repo by :user',
7 | 'merge_request' => 'New Comment on Merge Request - :repo by :user',
8 | 'snippet' => 'New Comment on Snippet - :repo by :user',
9 | ],
10 | 'view_comment' => 'View Comment: :link',
11 | 'snippet_comment' => 'View Comment on Snippet',
12 | ];
13 |
--------------------------------------------------------------------------------
/lang/ja/events/gitlab/note.php:
--------------------------------------------------------------------------------
1 | [
5 | 'commit' => 'New Comment on Commit - :repo by :user',
6 | 'issue' => 'New Comment on Issue - :repo by :user',
7 | 'merge_request' => 'New Comment on Merge Request - :repo by :user',
8 | 'snippet' => 'New Comment on Snippet - :repo by :user',
9 | ],
10 | 'view_comment' => 'View Comment: :link',
11 | 'snippet_comment' => 'View Comment on Snippet',
12 | ];
13 |
--------------------------------------------------------------------------------
/lang/vi/events/gitlab/note.php:
--------------------------------------------------------------------------------
1 | [
5 | 'commit' => 'Bình luận mới về Cam kết - :repo bởi :user',
6 | 'issue' => 'Bình luận mới về vấn đề - :repo bởi :user',
7 | 'merge_request' => 'Bình luận mới về yêu cầu hợp nhất - :repo bởi :user',
8 | 'snippet' => 'Bình luận mới về đoạn trích - :repo bởi :user',
9 | ],
10 | 'view_comment' => 'Xem bình luận: :link',
11 | 'snippet_comment' => 'Xem bình luận về đoạn trích',
12 | ];
13 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/merge_request/partials/_reviewers.blade.php:
--------------------------------------------------------------------------------
1 | reviewers) && count($payload->reviewers) > 0) {
8 | $reviewers = [];
9 | foreach ($payload->reviewers as $reviewer) {
10 | $reviewers[] = "{$reviewer->name}";
11 | }
12 |
13 | $textReviewers .= '👥' . __('tg-notifier::events/gitlab/merge_request.review') . implode(', ', $reviewers);
14 | }
15 | ?>
16 | {!! $textReviewers !!}
17 |
--------------------------------------------------------------------------------
/lang/de/app.php:
--------------------------------------------------------------------------------
1 | 'by',
5 | 'unknown_callback' => 'Unknown Callback. Something went wrong!',
6 | 'invalid_request' => 'Invalid Request!',
7 | 'branch' => 'Branch',
8 | 'commit' => 'Commit',
9 | 'title' => 'Title',
10 | 'state' => 'State',
11 | 'confidential' => 'Confidential',
12 | 'status' => 'Status',
13 | 'link' => 'Link',
14 | 'repo' => 'Repository',
15 | 'author' => [
16 | 'name' => 'Name',
17 | 'email' => 'Email',
18 | ],
19 | ];
20 |
--------------------------------------------------------------------------------
/lang/en/app.php:
--------------------------------------------------------------------------------
1 | 'by',
5 | 'unknown_callback' => 'Unknown Callback. Something went wrong!',
6 | 'invalid_request' => 'Invalid Request!',
7 | 'branch' => 'Branch',
8 | 'commit' => 'Commit',
9 | 'title' => 'Title',
10 | 'state' => 'State',
11 | 'confidential' => 'Confidential',
12 | 'status' => 'Status',
13 | 'link' => 'Link',
14 | 'repo' => 'Repository',
15 | 'author' => [
16 | 'name' => 'Name',
17 | 'email' => 'Email',
18 | ],
19 | ];
20 |
--------------------------------------------------------------------------------
/lang/ja/app.php:
--------------------------------------------------------------------------------
1 | 'by',
5 | 'unknown_callback' => 'Unknown Callback. Something went wrong!',
6 | 'invalid_request' => 'Invalid Request!',
7 | 'branch' => 'Branch',
8 | 'commit' => 'Commit',
9 | 'title' => 'Title',
10 | 'state' => 'State',
11 | 'confidential' => 'Confidential',
12 | 'status' => 'Status',
13 | 'link' => 'Link',
14 | 'repo' => 'Repository',
15 | 'author' => [
16 | 'name' => 'Name',
17 | 'email' => 'Email',
18 | ],
19 | ];
20 |
--------------------------------------------------------------------------------
/lang/vi/app.php:
--------------------------------------------------------------------------------
1 | 'bởi',
5 | 'unknown_callback' => 'Không rõ Callback. Đã xảy ra lỗi!',
6 | 'invalid_request' => 'Yêu cầu không hợp lệ!',
7 | 'branch' => 'Tên nhánh',
8 | 'commit' => 'Commit',
9 | 'title' => 'Tiêu đề',
10 | 'state' => 'Trạng thái',
11 | 'confidential' => 'Bí mật',
12 | 'status' => 'Trạng thái',
13 | 'link' => 'Liên kết',
14 | 'repo' => 'Kho',
15 | 'author' => [
16 | 'name' => 'Tên',
17 | 'email' => 'Email',
18 | ],
19 | ];
20 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/note/issue.blade.php:
--------------------------------------------------------------------------------
1 |
7 |
8 | 💬 {!! __('tg-notifier::events/gitlab/note.title.issue', [
9 | 'repo' => "🦊{$payload->project->path_with_namespace}#{$payload->issue->iid}",
10 | 'user' => "{$payload->user->name}"
11 | ]
12 | ) !!}
13 |
14 | 📢 {{ $payload->issue->title }}
15 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
16 |
--------------------------------------------------------------------------------
/resources/views/events/shared/partials/gitlab/_assignees.blade.php:
--------------------------------------------------------------------------------
1 | assignees)) {
8 | $assigneeText = __('tg-notifier::events/shared/gitlab._assignee.title');
9 | $assigneeArray = [];
10 | foreach ($payload->assignees as $assignee) {
11 | $assigneeArray[] = "{$assignee->name}";
12 | }
13 | $assigneeText .= implode(', ', $assigneeArray);
14 | }
15 | ?>
16 | {!! $assigneeText ?? '' !!}
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /vendor
2 | composer.lock
3 | composer.phar
4 | .DS_Store
5 | /node_modules
6 | /public/storage
7 | /storage/*.key
8 | Thumbs.db
9 | /bower_components
10 |
11 | .env
12 | .env.backup
13 | .idea
14 | .vscode
15 |
16 | .vagrant
17 | Homestead.json
18 | Homestead.yaml
19 | npm-debug.log
20 |
21 | .phpunit.cache
22 | .phpunit.result.cache
23 | /storage/.license
24 | /storage/fonts
25 | /storage/installing
26 | /storage/installed
27 | /log
28 |
29 | package-lock.json
30 | yarn.lock
31 | /.sass-cache
32 |
33 | build
34 | .php-cs-fixer.cache
35 | storage
36 |
--------------------------------------------------------------------------------
/resources/views/events/github/deploy_key/created.blade.php:
--------------------------------------------------------------------------------
1 |
7 |
8 | 💬 {!! __('tg-notifier::events/github/deploy_key.created.title', [
9 | 'repo' => "🦑 {$payload->repository->full_name}",
10 | 'user' => "{$payload->key->added_by}",
11 | ]
12 | ) !!}
13 |
14 | 📢 {!! __('tg-notifier::events/github/deploy_key.key_title') !!}: {{ $payload->key->title }}
15 | {!! __('tg-notifier::events/github/deploy_key.created.message') !!}
16 |
--------------------------------------------------------------------------------
/resources/views/events/github/deploy_key/deleted.blade.php:
--------------------------------------------------------------------------------
1 |
7 |
8 | 🗑 {!! __('tg-notifier::events/github/deploy_key.deleted.title', [
9 | 'repo' => "🦑 repository->html_url}'>{$payload->repository->full_name}",
10 | 'user' => "{$payload->key->added_by}",
11 | ]
12 | ) !!}
13 |
14 | 📢 {!! __('tg-notifier::events/github/deploy_key.key_title') !!}: {{ $payload->key->title }}
15 | {!! __('tg-notifier::events/github/deploy_key.deleted.message') !!}
16 |
--------------------------------------------------------------------------------
/lang/de/tools/menu.php:
--------------------------------------------------------------------------------
1 | 'BOT MENU',
5 |
6 | 'start' => 'Welcome to the bot',
7 | 'menu' => 'Show menu of the bot',
8 | 'token' => 'Show token of the bot',
9 | 'id' => 'Show the ID of the current chat',
10 | 'usage' => 'Show step by step usage',
11 | 'server' => 'To get Server Information',
12 | 'settings' => 'Go to settings of the bot',
13 | 'set_menu' => 'Set the menu of the bot',
14 | 'back' => 'Back',
15 |
16 | 'discussion' => 'Discussion',
17 | 'source_code' => 'Source Code',
18 | ];
19 |
--------------------------------------------------------------------------------
/lang/en/tools/menu.php:
--------------------------------------------------------------------------------
1 | 'BOT MENU',
5 |
6 | 'start' => 'Welcome to the bot',
7 | 'menu' => 'Show menu of the bot',
8 | 'token' => 'Show token of the bot',
9 | 'id' => 'Show the ID of the current chat',
10 | 'usage' => 'Show step by step usage',
11 | 'server' => 'To get Server Information',
12 | 'settings' => 'Go to settings of the bot',
13 | 'set_menu' => 'Set the menu of the bot',
14 | 'back' => 'Back',
15 |
16 | 'discussion' => 'Discussion',
17 | 'source_code' => 'Source Code',
18 | ];
19 |
--------------------------------------------------------------------------------
/lang/ja/tools/menu.php:
--------------------------------------------------------------------------------
1 | 'BOT MENU',
5 |
6 | 'start' => 'Welcome to the bot',
7 | 'menu' => 'Show menu of the bot',
8 | 'token' => 'Show token of the bot',
9 | 'id' => 'Show the ID of the current chat',
10 | 'usage' => 'Show step by step usage',
11 | 'server' => 'To get Server Information',
12 | 'settings' => 'Go to settings of the bot',
13 | 'set_menu' => 'Set the menu of the bot',
14 | 'back' => 'Back',
15 |
16 | 'discussion' => 'Discussion',
17 | 'source_code' => 'Source Code',
18 | ];
19 |
--------------------------------------------------------------------------------
/lang/vi/tools/menu.php:
--------------------------------------------------------------------------------
1 | 'BOT MENU',
5 |
6 | 'start' => 'Welcome to the bot',
7 | 'menu' => 'Show menu of the bot',
8 | 'token' => 'Show token of the bot',
9 | 'id' => 'Show the ID of the current chat',
10 | 'usage' => 'Show step by step usage',
11 | 'server' => 'To get Server Information',
12 | 'settings' => 'Go to settings of the bot',
13 | 'set_menu' => 'Set the menu of the bot',
14 | 'back' => 'Back',
15 |
16 | 'discussion' => 'Discussion',
17 | 'source_code' => 'Source Code',
18 | ];
19 |
--------------------------------------------------------------------------------
/resources/views/events/github/workflow_job/queued.blade.php:
--------------------------------------------------------------------------------
1 |
7 |
8 | {!! __('tg-notifier::events/github/workflow_job.queued.title', ['repo' => "🦑{$payload->repository->full_name}"]) !!}
9 |
10 | 🚀 {!! __('tg-notifier::events/github/workflow_job.queued.name') !!}: 💥 {{ $payload->workflow_job->name }} ⏰
11 | 🔗 {!! __('tg-notifier::events/github/workflow_job.link', ['link' => "{$payload->workflow_job->workflow_name}"]) !!}
12 |
--------------------------------------------------------------------------------
/resources/views/events/github/pull_request/partials/_reviewers.blade.php:
--------------------------------------------------------------------------------
1 | pull_request->requested_reviewers) && count($payload->pull_request->requested_reviewers) > 0) {
8 | $reviewers = [];
9 | foreach ($payload->pull_request->requested_reviewers as $reviewer) {
10 | $reviewers[] = "{$reviewer->login}";
11 | }
12 |
13 | $textReviewers .= '👥 '.__('tg-notifier::events/github/pull_request.review') . implode(', ', $reviewers);
14 | }
15 | ?>
16 | {!! $textReviewers !!}
17 |
--------------------------------------------------------------------------------
/resources/views/events/github/pull_request/locked.blade.php:
--------------------------------------------------------------------------------
1 | pull_request;
7 | ?>
8 |
9 | 👷♂️🛠️ {!! __('tg-notifier::events/github/pull_request.locked.title', [
10 | 'repo' => "🦑{$payload->repository->full_name}#$pull_request->number",
11 | 'user' => "@{$payload->sender->login}"
12 | ]
13 | ) !!}
14 |
15 | 🏷 {!! __('tg-notifier::events/github/pull_request.title') !!}: {{ $pull_request->title }}
16 |
--------------------------------------------------------------------------------
/resources/views/events/github/pull_request/unlocked.blade.php:
--------------------------------------------------------------------------------
1 | pull_request;
7 | ?>
8 |
9 | 👷♂️🛠️ {!! __('tg-notifier::events/github/pull_request.unlocked.title', [
10 | 'repo' => "🦑{$payload->repository->full_name}#$pull_request->number",
11 | 'user' => "@{$payload->sender->login}"
12 | ]
13 | ) !!}
14 |
15 | 🏷 {!! __('tg-notifier::events/github/pull_request.title') !!}: {{ $pull_request->title }}
16 |
--------------------------------------------------------------------------------
/resources/views/events/github/workflow_job/in_progress.blade.php:
--------------------------------------------------------------------------------
1 |
7 |
8 | 🔧 {!! __('tg-notifier::events/github/workflow_job.in_progress.progress', ['repo' => "🦑{$payload->repository->html_url}"]) !!}
9 |
10 | 🚀 {!! __('tg-notifier::events/github/workflow_job.in_progress.running') !!}: 💥 {{ $payload->workflow_job->name }} ⏳
11 | 🔗 {!! __('tg-notifier::events/github/workflow_job.link', ['link' => "{$payload->workflow_job->workflow_name}"]) !!}
12 |
--------------------------------------------------------------------------------
/resources/views/tools/usage.blade.php:
--------------------------------------------------------------------------------
1 |
5 | {!! __('tg-notifier::tools/usage.github.title') !!}
6 |
7 | @foreach($githubSetupSteps as $githubSetupStep)
8 | {!! $githubSetupStep !!}
9 | @endforeach
10 |
11 | ----------
12 | {!! __('tg-notifier::tools/usage.gitlab.title') !!}
13 |
14 | @foreach($gitlabSetupSteps as $gitlabSetupStep)
15 | {!! $gitlabSetupStep !!}
16 | @endforeach
17 |
18 | {!! __('tg-notifier::tools/usage.completionMessage') !!}
19 |
--------------------------------------------------------------------------------
/resources/views/events/github/label/created.blade.php:
--------------------------------------------------------------------------------
1 | label;
7 | ?>
8 |
9 | ✒ {!! __('tg-notifier::events/github/label.created.title', [
10 | 'repo' => "⚠️ - 🦑{$payload->repository->full_name}",
11 | 'user' => "@{$payload->sender->login}",
12 | ]
13 | ) !!}
14 |
15 | 🔖 {{ $payload->label->name }}
16 | {!! __('tg-notifier::events/shared/github._description.title') !!}: {{ \Illuminate\Support\Str::limit($label->description) }}
17 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/wiki_page/create.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 📒 {!! __('tg-notifier::events/gitlab/wiki_page.title.create', [
9 | 'repo' => "🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->slug}",
10 | 'user' => "{$payload->user->name}"
11 | ]) !!}
12 |
13 | 📝 {!! __('tg-notifier::events/gitlab/wiki_page.name') !!}: {{ $payload->object_attributes->title }}
14 |
15 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
16 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/wiki_page/delete.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 🗑 {!! __('tg-notifier::events/gitlab/wiki_page.title.delete', [
9 | 'repo' => "🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->slug}",
10 | 'user' => "{$payload->user->name}"
11 | ]) !!}
12 |
13 | 📝 {!! __('tg-notifier::events/gitlab/wiki_page.name') !!}: {{ $payload->object_attributes->title }}
14 |
15 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
16 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/wiki_page/update.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 📝 {!! __('tg-notifier::events/gitlab/wiki_page.title.update', [
9 | 'repo' => "🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->slug}",
10 | 'user' => "{$payload->user->name}"
11 | ]) !!}
12 |
13 | 📝 {!! __('tg-notifier::events/gitlab/wiki_page.name') !!}: {{ $payload->object_attributes->title }}
14 |
15 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
16 |
--------------------------------------------------------------------------------
/resources/views/events/github/ping/default.blade.php:
--------------------------------------------------------------------------------
1 |
8 |
9 | ⚡ {!! __('tg-notifier::events/github/ping.title') !!} 🎊
10 |
11 | @if(isset($payload->organization))
12 | 🏢 {!! __('tg-notifier::events/github/ping.organization') !!}: {{ $payload->organization->login }}
13 | @endif
14 | @if(isset($payload->repository))
15 | 📦 {!! __('tg-notifier::events/github/ping.full_name') !!}: 🦑{{ $payload->repository->full_name }}
16 | @endif
17 | @if(isset($payload->sender))
18 | 👤 {!! __('tg-notifier::events/github/ping.sender') !!}: {{ $payload->sender->login }}
19 | @endif
20 |
--------------------------------------------------------------------------------
/resources/views/events/shared/partials/github/_assignees.blade.php:
--------------------------------------------------------------------------------
1 | {$event}->assignees)) {
9 | $assigneeArray = [];
10 | foreach ($payload->{$event}->assignees as $assignee) {
11 | $assigneeArray[] = "html_url}\">@{$assignee->login} ";
12 | }
13 | $assigneeText .= implode(', ', $assigneeArray);
14 | }
15 | ?>
16 | @if(!empty($assigneeText))
17 | 🙋 {!! __('tg-notifier::events/shared/github._assignee.title') !!}: {!! $assigneeText !!}
18 | @endif
19 |
--------------------------------------------------------------------------------
/resources/views/events/github/team/deleted.blade.php:
--------------------------------------------------------------------------------
1 |
8 |
9 | 🗑 {!! __('tg-notifier::events/github/team.deleted.title') !!} 🎊
10 |
11 | @if(isset($payload->organization))
12 | 🏢 {!! __('tg-notifier::events/github/team.deleted.organization') !!}: {{ $payload->organization->login }}
13 | @endif
14 | @if(isset($payload->sender))
15 | 👤 {!! __('tg-notifier::events/github/team.deleted.sender') !!}: {{ $payload->sender->login }}
16 | @endif
17 | @if(isset($payload->team))
18 | 👥 {!! __('tg-notifier::events/github/team.deleted.team') !!}: {{ $payload->team->name }}
19 | @endif
20 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/tag_push/default.blade.php:
--------------------------------------------------------------------------------
1 | ref);
7 | $tag = implode('/', array_slice($ref, 2));
8 | $tagUrl = $payload->project->web_url.'/tags/'.$tag;
9 | ?>
10 |
11 | ⚙️ {!! __('tg-notifier::events/gitlab/tag_push.title', [
12 | 'repo' => "🦊{$payload->project->path_with_namespace}",
13 | ]) !!}
14 |
15 | 🔖 {!! __('tg-notifier::events/gitlab/tag_push.name') !!}: {{ $tag }}
16 | 👤 {!! __('tg-notifier::events/gitlab/tag_push.pusher') !!}: {{ $payload->user_name }}
17 |
--------------------------------------------------------------------------------
/resources/views/tools/custom_event.blade.php:
--------------------------------------------------------------------------------
1 |
12 | {!! __('tg-notifier::tools/custom_event.title', ['link' => "$platform $documentation"]) !!}
13 | ---
14 | {!! __('tg-notifier::tools/custom_event.instruction') !!}
15 | {!! __('tg-notifier::tools/custom_event.eventSelection') !!}
16 |
--------------------------------------------------------------------------------
/resources/views/events/github/meta/deleted.blade.php:
--------------------------------------------------------------------------------
1 |
7 |
8 | 🗑 {!! __('tg-notifier::events/github/meta.delete.title') !!}
9 |
10 | @if(isset($payload->organization))
11 | 🏢 {!! __('tg-notifier::events/github/meta.delete.organization') !!}: {{ $payload->organization->login }}
12 | @endif
13 | @if(isset($payload->repository))
14 | 📦 {!! __('tg-notifier::events/github/meta.delete.full_name') !!}: 🦑{{ $payload->repository->full_name }}
15 | @endif
16 | @if(isset($payload->sender))
17 | 👤 {!! __('tg-notifier::events/github/meta.delete.sender') !!}: {{ $payload->sender->login }}
18 | @endif
19 |
--------------------------------------------------------------------------------
/.github/workflows/php-cs-fixer.yml:
--------------------------------------------------------------------------------
1 | name: Check & fix styling
2 |
3 | on: [push]
4 |
5 | permissions:
6 | contents: write
7 |
8 | jobs:
9 | php-cs-fixer:
10 | runs-on: ubuntu-latest
11 |
12 | steps:
13 | - name: Checkout code
14 | uses: actions/checkout@v6
15 | with:
16 | ref: ${{ github.head_ref }}
17 |
18 | - name: Run PHP CS Fixer
19 | uses: docker://oskarstark/php-cs-fixer-ga
20 | with:
21 | args: --config=.php-cs-fixer.dist.php --allow-risky=yes
22 |
23 | - name: Commit changes
24 | uses: stefanzweifel/git-auto-commit-action@v7
25 | with:
26 | commit_message: Fix styling
27 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/release/create.blade.php:
--------------------------------------------------------------------------------
1 |
8 |
9 | ✅🚀 {!! __('tg-notifier::events/gitlab/release.title.create', [
10 | 'repo' => "🦊{$payload->project->path_with_namespace}#{$payload->tag}",
11 | 'user' => "{$payload->commit->author->name}"
12 | ]) !!}
13 |
14 | 🔖 {{ __('tg-notifier::events/gitlab/release.tag') }}: {{ $payload->tag }}
15 | 🗞 {{ __('tg-notifier::events/gitlab/release.name') }}: {{ $payload->name }}
16 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
17 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/release/delete.blade.php:
--------------------------------------------------------------------------------
1 |
8 |
9 | 🚫🚀 {!! __('tg-notifier::events/gitlab/release.title.delete', [
10 | 'repo' => "🦊{$payload->project->path_with_namespace}#{$payload->tag}",
11 | 'user' => "{$payload->commit->author->name}"
12 | ]) !!}
13 |
14 | 🔖 {{ __('tg-notifier::events/gitlab/release.tag') }}: {{ $payload->tag }}
15 | 🗞 {{ __('tg-notifier::events/gitlab/release.name') }}: {{ $payload->name }}
16 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
17 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/release/update.blade.php:
--------------------------------------------------------------------------------
1 |
8 |
9 | 📝🚀 {!! __('tg-notifier::events/gitlab/release.title.update', [
10 | 'repo' => "🦊{$payload->project->path_with_namespace}#{$payload->tag}",
11 | 'user' => "{$payload->commit->author->name}"
12 | ]) !!}
13 |
14 | 🔖 {{ __('tg-notifier::events/gitlab/release.tag') }}: {{ $payload->tag }}
15 | 🗞 {{ __('tg-notifier::events/gitlab/release.name') }}: {{ $payload->name }}
16 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
17 |
--------------------------------------------------------------------------------
/resources/views/events/github/issues/closed.blade.php:
--------------------------------------------------------------------------------
1 | issue;
8 | ?>
9 |
10 | 🚫 {!! __('tg-notifier::events/github/issues.closed.title', [
11 | 'issue' => "🦑 {$payload->repository->full_name}#$issue->number",
12 | 'user' => "@{$payload->sender->login}"
13 | ]
14 | ) !!}
15 |
16 | 📢 {!! __('tg-notifier::events/github/issues.issue_title') !!}: {{ $issue->title }}
17 |
18 | @include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event'))
19 |
--------------------------------------------------------------------------------
/resources/views/events/github/issues/deleted.blade.php:
--------------------------------------------------------------------------------
1 | issue;
8 | ?>
9 |
10 | 🗑 {!! __('tg-notifier::events/github/issues.deleted.title', [
11 | 'issue' => "🦑 {$payload->repository->full_name}#$issue->number",
12 | 'user' => "@{$payload->sender->login}"
13 | ]
14 | ) !!}
15 |
16 | 📢 {!! __('tg-notifier::events/github/issues.issue_title') !!}: {{ $issue->title }}
17 |
18 | @include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event'))
19 |
--------------------------------------------------------------------------------
/resources/views/events/github/issues/locked.blade.php:
--------------------------------------------------------------------------------
1 | issue;
8 | ?>
9 |
10 | 🔒 {!! __('tg-notifier::events/github/issues.locked.title', [
11 | 'issue' => "🦑 {$payload->repository->full_name}#$issue->number",
12 | 'user' => "@{$payload->sender->login}"
13 | ]
14 | ) !!}
15 |
16 | 📢 {!! __('tg-notifier::events/github/issues.issue_title') !!}: {{ $issue->title }}
17 |
18 | @include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event'))
19 |
--------------------------------------------------------------------------------
/resources/views/events/github/issues/pinned.blade.php:
--------------------------------------------------------------------------------
1 | issue;
8 | ?>
9 |
10 | 📌 {!! __('tg-notifier::events/github/issues.pinned.title', [
11 | 'issue' => "🦑 {$payload->repository->full_name}#$issue->number",
12 | 'user' => "@{$payload->sender->login}"
13 | ]
14 | ) !!}
15 |
16 | 📢 {!! __('tg-notifier::events/github/issues.issue_title') !!}: {{ $issue->title }}
17 |
18 | @include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event'))
19 |
--------------------------------------------------------------------------------
/resources/views/events/github/issues/unlocked.blade.php:
--------------------------------------------------------------------------------
1 | issue;
8 | ?>
9 |
10 | 🔐 {!! __('tg-notifier::events/github/issues.unlocked.title', [
11 | 'issue' => "🦑 {$payload->repository->full_name}#$issue->number",
12 | 'user' => "@{$payload->sender->login}"
13 | ]
14 | ) !!}
15 |
16 | 📢 {!! __('tg-notifier::events/github/issues.issue_title') !!}: {{ $issue->title }}
17 |
18 | @include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event'))
19 |
--------------------------------------------------------------------------------
/resources/views/events/github/issues/unpinned.blade.php:
--------------------------------------------------------------------------------
1 | issue;
8 | ?>
9 |
10 | 🔔 {!! __('tg-notifier::events/github/issues.unpinned.title', [
11 | 'issue' => "🦑 {$payload->repository->full_name}#$issue->number",
12 | 'user' => "@{$payload->sender->login}"
13 | ]
14 | ) !!}
15 |
16 | 📢 {!! __('tg-notifier::events/github/issues.issue_title') !!}: {{ $issue->title }}
17 |
18 | @include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event'))
19 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/note/snippet.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 💬 {!! __('tg-notifier::events/gitlab/note.title.snippet', [
9 | 'repo' => "🦊{$payload->project->path_with_namespace}",
10 | 'user' => "{$payload->user->name}"
11 | ]
12 | ) !!}
13 |
14 | 📝 {{ __('tg-notifier::app.title') }}: {{ $payload->snippet->title }}
15 | 🔗 {{ __('tg-notifier::events/gitlab/note.snippet_comment') }}
16 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
17 |
--------------------------------------------------------------------------------
/resources/views/events/github/team/edited.blade.php:
--------------------------------------------------------------------------------
1 |
8 |
9 | ⚡ {!! __('tg-notifier::events/github/team.edited.title') !!} 🎊
10 |
11 | @if(isset($payload->organization))
12 | 🏢 {!! __('tg-notifier::events/github/team.edited.organization') !!}: {{ $payload->organization->login }}
13 | @endif
14 | @if(isset($payload->sender))
15 | 👤 {!! __('tg-notifier::events/github/team.edited.sender') !!}: {{ $payload->sender->login }}
16 | @endif
17 | @if(isset($payload->team))
18 | 👥 {!! __('tg-notifier::events/github/team.edited.team') !!}: {{ $payload->team->name }}
19 | @endif
20 |
--------------------------------------------------------------------------------
/resources/views/events/github/team/created.blade.php:
--------------------------------------------------------------------------------
1 |
8 |
9 | ⚡ {!! __('tg-notifier::events/github/team.created.title') !!} 🎊
10 |
11 | @if(isset($payload->organization))
12 | 🏢 {!! __('tg-notifier::events/github/team.created.organization') !!}: {{ $payload->organization->login }}
13 | @endif
14 | @if(isset($payload->sender))
15 | 👤 {!! __('tg-notifier::events/github/team.created.sender') !!}: {{ $payload->sender->login }}
16 | @endif
17 | @if(isset($payload->team))
18 | 👥 {!! __('tg-notifier::events/github/team.created.team') !!}: {{ $payload->team->name }}
19 | @endif
20 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/merge_request/default.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 🔥 {{ __('tg-notifier::events/gitlab/merge_request.default') }}
9 |
10 | 🛠 {{ $payload->object_attributes->title }}
11 | 🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯
12 | @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
13 | @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload'))
14 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
15 |
--------------------------------------------------------------------------------
/resources/views/events/github/team_add/default.blade.php:
--------------------------------------------------------------------------------
1 |
8 |
9 | ⚡ {!! __('tg-notifier::events/github/team_add.title') !!} 🎊
10 |
11 | @if(isset($payload->organization))
12 | 🏢 {!! __('tg-notifier::events/github/team_add.organization') !!}: {{ $payload->organization->login }}
13 | @endif
14 | @if(isset($payload->repository))
15 | 📦 {!! __('tg-notifier::events/github/team_add.full_name') !!}: 🦑{{ $payload->repository->full_name }}
16 | @endif
17 | @if(isset($payload->team))
18 | 👥 {!! __('tg-notifier::events/github/team_add.team') !!}: {{ $payload->team->name }}
19 | @endif
20 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/note/merge_request.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 💬 {!! __('tg-notifier::events/gitlab/note.title.merge_request', [
9 | 'repo' => "🦊{$payload->project->path_with_namespace}#{$payload->merge_request->iid}",
10 | 'user' => "{$payload->user->name}"
11 | ]
12 | ) !!}
13 |
14 | 🛠 {{ $payload->merge_request->title }}
15 | 🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->merge_request->source_branch }} -> {{ $payload->merge_request->target_branch }} 🎯
16 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
17 |
--------------------------------------------------------------------------------
/resources/views/events/github/branch_protection_rule/created.blade.php:
--------------------------------------------------------------------------------
1 | repository;
7 | ?>
8 |
9 | ⚠️ {!! __('tg-notifier::events/github/branch_protection_rule.created.title', [
10 | 'repo' => "🦑$repository->full_name"
11 | ]
12 | ) !!}
13 |
14 | 🛡 {!! __('tg-notifier::events/github/branch_protection_rule.name') !!}: {{ $payload->rule->name }}
15 | 🔗 {!! __('tg-notifier::events/github/branch_protection_rule.created.link', [
16 | 'link' => "#{$payload->rule->id}"
17 | ]
18 | ) !!}
19 |
--------------------------------------------------------------------------------
/lang/de/events/github/workflow_job.php:
--------------------------------------------------------------------------------
1 | [
5 | 'success' => 'Action Completed from :repo',
6 | 'failure' => 'Canceled Action from :repo',
7 | ],
8 | 'status' => [
9 | 'title' => 'Status',
10 | 'success' => 'Success',
11 | 'failure' => 'Failure',
12 | ],
13 | 'in_progress' => [
14 | 'progress' => 'Action in progress form :repo',
15 | 'running' => 'Running action',
16 | ],
17 | 'queued' => [
18 | 'title' => ' Action Queued from :repo',
19 | 'name' => 'Queued action',
20 | ],
21 | 'link' => 'Workflow job link: :link',
22 | 'name' => 'Workflow job name',
23 | ];
24 |
--------------------------------------------------------------------------------
/lang/en/events/github/workflow_job.php:
--------------------------------------------------------------------------------
1 | [
5 | 'success' => 'Action Completed from :repo',
6 | 'failure' => 'Canceled Action from :repo',
7 | ],
8 | 'status' => [
9 | 'title' => 'Status',
10 | 'success' => 'Success',
11 | 'failure' => 'Failure',
12 | ],
13 | 'in_progress' => [
14 | 'progress' => 'Action in progress form :repo',
15 | 'running' => 'Running action',
16 | ],
17 | 'queued' => [
18 | 'title' => ' Action Queued from :repo',
19 | 'name' => 'Queued action',
20 | ],
21 | 'link' => 'Workflow job link: :link',
22 | 'name' => 'Workflow job name',
23 | ];
24 |
--------------------------------------------------------------------------------
/lang/ja/events/github/workflow_job.php:
--------------------------------------------------------------------------------
1 | [
5 | 'success' => 'Action Completed from :repo',
6 | 'failure' => 'Canceled Action from :repo',
7 | ],
8 | 'status' => [
9 | 'title' => 'Status',
10 | 'success' => 'Success',
11 | 'failure' => 'Failure',
12 | ],
13 | 'in_progress' => [
14 | 'progress' => 'Action in progress form :repo',
15 | 'running' => 'Running action',
16 | ],
17 | 'queued' => [
18 | 'title' => ' Action Queued from :repo',
19 | 'name' => 'Queued action',
20 | ],
21 | 'link' => 'Workflow job link: :link',
22 | 'name' => 'Workflow job name',
23 | ];
24 |
--------------------------------------------------------------------------------
/lang/vi/events/github/workflow_job.php:
--------------------------------------------------------------------------------
1 | [
5 | 'success' => 'Action Completed from :repo',
6 | 'failure' => 'Canceled Action from :repo',
7 | ],
8 | 'status' => [
9 | 'title' => 'Status',
10 | 'success' => 'Success',
11 | 'failure' => 'Failure',
12 | ],
13 | 'in_progress' => [
14 | 'progress' => 'Action in progress form :repo',
15 | 'running' => 'Running action',
16 | ],
17 | 'queued' => [
18 | 'title' => ' Action Queued from :repo',
19 | 'name' => 'Queued action',
20 | ],
21 | 'link' => 'Workflow job link: :link',
22 | 'name' => 'Workflow job name',
23 | ];
24 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/issue/close.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 🚫 {!! __('tg-notifier::events/gitlab/issues.closed.title', [
9 | 'issue' => "🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->id}",
10 | 'user' => "{$payload->user->name}"
11 | ]
12 | ) !!}
13 |
14 | 📢 {{ __('tg-notifier::app.title') }}: {{ $payload->object_attributes->title }}
15 | @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
16 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
17 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/issue/open.blade.php:
--------------------------------------------------------------------------------
1 |
8 | ⚠️ {!! __('tg-notifier::events/gitlab/issues.opened.title', [
9 | 'issue' => "🦊 {$payload->project->path_with_namespace}#{$payload->object_attributes->id}",
10 | 'user' => "{$payload->user->name}"
11 | ]
12 | ) !!}
13 |
14 | 📢 {{ __('tg-notifier::app.title') }}: {{ $payload->object_attributes->title }}
15 | @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
16 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
17 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/issue/reopen.blade.php:
--------------------------------------------------------------------------------
1 |
8 | ⚠️ {!! __('tg-notifier::events/gitlab/issues.reopened.title', [
9 | 'issue' => "⚠️ to 🦊 {$payload->project->path_with_namespace}#{$payload->object_attributes->id}",
10 | 'user' => "{$payload->user->name}"
11 | ]
12 | ) !!}
13 |
14 | 📢 {{ __('tg-notifier::app.title') }}: {{ $payload->object_attributes->title }}
15 | @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
16 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
17 |
--------------------------------------------------------------------------------
/resources/views/events/github/pull_request/labeled.blade.php:
--------------------------------------------------------------------------------
1 | pull_request;
7 | ?>
8 |
9 | 👷♂️🛠️ {!! __('tg-notifier::events/github/pull_request.labeled.title', [
10 | 'repo' => "🦑{$payload->repository->full_name}#$pull_request->number",
11 | 'user' => "@{$payload->sender->login}"
12 | ]
13 | ) !!}
14 |
15 | 🔖 {!! __('tg-notifier::events/github/pull_request.labeled.name') !!}: {{ $payload->label->name }}
16 | 📑 {!! __('tg-notifier::events/github/pull_request.labeled.description') !!}: {{ Str::limit($payload->label->description) }}
17 |
--------------------------------------------------------------------------------
/resources/views/tools/server.blade.php:
--------------------------------------------------------------------------------
1 |
10 |
11 | {!! __('tg-notifier::tools/server.address', ['link' => "{$serverAddr}"]) !!}
12 | {!! __('tg-notifier::tools/server.name', ['link' => "{$serverName}"]) !!}
13 | {!! __('tg-notifier::tools/server.port', ['link' => "{$serverPort}"]) !!}
14 | {!! __('tg-notifier::tools/server.software', ['link' => "{$serverSoftware}"]) !!}
15 |
--------------------------------------------------------------------------------
/resources/views/events/github/workflow_run/requested.blade.php:
--------------------------------------------------------------------------------
1 |
7 |
8 | {!! __('tg-notifier::events/github/workflow_run.requested.title', ['repo' => "🦑{$payload->repository->full_name}"]) !!}
9 |
10 | ⏳ {!! __('tg-notifier::events/github/workflow_run.requested.body') !!}: 💥 {!! $payload->workflow_run->name !!}
11 | 📝 {!! __('tg-notifier::events/github/workflow_run.display_title') !!}: {!! $payload->workflow_run->display_title !!}
12 | 🔗 {!! __('tg-notifier::events/github/workflow_run.link', ['link' => "{$payload->workflow_run->event} - {$payload->workflow_run->name}"]) !!}
13 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/note/commit.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 💬 {!! __('tg-notifier::events/gitlab/note.title.commit', [
9 | 'repo' => "🦊{$payload->project->path_with_namespace}",
10 | 'user' => "{$payload->user->name}"
11 | ]
12 | ) !!}
13 |
14 | ⚙️ {{ __('tg-notifier::app.commit') }}: {{ $payload->commit->message }}
15 | 🔗 {!! __('tg-notifier::events/gitlab/note.view_comment', [
16 | 'link' => "{$payload->commit->id}"
17 | ]
18 | ) !!}
19 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
20 |
--------------------------------------------------------------------------------
/resources/views/events/github/pull_request/assigned.blade.php:
--------------------------------------------------------------------------------
1 | pull_request;
7 | ?>
8 |
9 | 👷♂️🛠️ {!! __('tg-notifier::events/github/pull_request.assigned.title', [
10 | 'repo' => "🦑{$payload->repository->full_name}#$pull_request->number",
11 | 'user' => "@{$payload->sender->login}"
12 | ]
13 | ) !!}
14 |
15 | {!! __('tg-notifier::events/github/pull_request.assigned.body', [
16 | 'name' => "@{$payload->assignee->login}",
17 | 'pullRequest' => "$pull_request->title",
18 | ]
19 | ) !!}
20 |
--------------------------------------------------------------------------------
/resources/views/events/github/pull_request/unassigned.blade.php:
--------------------------------------------------------------------------------
1 | pull_request;
7 | ?>
8 |
9 | 👷♂️🛠️ {!! __('tg-notifier::events/github/pull_request.unassigned.title', [
10 | 'repo' => "🦑{$payload->repository->full_name}#$pull_request->number",
11 | 'user' => "@{$payload->sender->login}"
12 | ]
13 | ) !!}
14 |
15 | {!! __('tg-notifier::events/github/pull_request.unassigned.body', [
16 | 'name' => "@{$payload->assignee->login}",
17 | 'pullRequest' => "$pull_request->title",
18 | ]
19 | ) !!}
20 |
--------------------------------------------------------------------------------
/lang/de/events/github/branch_protection_rule.php:
--------------------------------------------------------------------------------
1 | 'Rule Name',
5 | 'created' => [
6 | 'title' => 'New Branch Protection Rules from :repo',
7 | 'link' => 'Link: :link',
8 | ],
9 | 'edited' => [
10 | 'title' => 'Branch Protection Rules Have Been Edited from :repo',
11 | 'changes' => [
12 | 'title' => [
13 | 'name' => 'The Name has been changed',
14 | 'from' => 'From: :title_from',
15 | 'to' => 'To: :title_to',
16 | ],
17 | ],
18 | 'link' => 'Link: :link',
19 | ],
20 | 'deleted' => [
21 | 'title' => 'Branch Protection Rules Deleted from :repo',
22 | ],
23 | ];
24 |
--------------------------------------------------------------------------------
/lang/en/events/github/branch_protection_rule.php:
--------------------------------------------------------------------------------
1 | 'Rule Name',
5 | 'created' => [
6 | 'title' => 'New Branch Protection Rules from :repo',
7 | 'link' => 'Link: :link',
8 | ],
9 | 'edited' => [
10 | 'title' => 'Branch Protection Rules Have Been Edited from :repo',
11 | 'changes' => [
12 | 'title' => [
13 | 'name' => 'The Name has been changed',
14 | 'from' => 'From: :title_from',
15 | 'to' => 'To: :title_to',
16 | ],
17 | ],
18 | 'link' => 'Link: :link',
19 | ],
20 | 'deleted' => [
21 | 'title' => 'Branch Protection Rules Deleted from :repo',
22 | ],
23 | ];
24 |
--------------------------------------------------------------------------------
/lang/ja/events/github/branch_protection_rule.php:
--------------------------------------------------------------------------------
1 | 'Rule Name',
5 | 'created' => [
6 | 'title' => 'New Branch Protection Rules from :repo',
7 | 'link' => 'Link: :link',
8 | ],
9 | 'edited' => [
10 | 'title' => 'Branch Protection Rules Have Been Edited from :repo',
11 | 'changes' => [
12 | 'title' => [
13 | 'name' => 'The Name has been changed',
14 | 'from' => 'From: :title_from',
15 | 'to' => 'To: :title_to',
16 | ],
17 | ],
18 | 'link' => 'Link: :link',
19 | ],
20 | 'deleted' => [
21 | 'title' => 'Branch Protection Rules Deleted from :repo',
22 | ],
23 | ];
24 |
--------------------------------------------------------------------------------
/lang/vi/events/github/branch_protection_rule.php:
--------------------------------------------------------------------------------
1 | 'Rule Name',
5 | 'created' => [
6 | 'title' => 'New Branch Protection Rules from :repo',
7 | 'link' => 'Link: :link',
8 | ],
9 | 'edited' => [
10 | 'title' => 'Branch Protection Rules Have Been Edited from :repo',
11 | 'changes' => [
12 | 'title' => [
13 | 'name' => 'The Name has been changed',
14 | 'from' => 'From: :title_from',
15 | 'to' => 'To: :title_to',
16 | ],
17 | ],
18 | 'link' => 'Link: :link',
19 | ],
20 | 'deleted' => [
21 | 'title' => 'Branch Protection Rules Deleted from :repo',
22 | ],
23 | ];
24 |
--------------------------------------------------------------------------------
/resources/views/events/github/issues/opened.blade.php:
--------------------------------------------------------------------------------
1 | issue;
8 | ?>
9 |
10 | ⚠️ {!! __('tg-notifier::events/github/issues.opened.title', [
11 | 'issue' => "🦑 {$payload->repository->full_name}#$issue->number",
12 | 'user' => "@{$payload->sender->login}"
13 | ]
14 | ) !!}
15 |
16 | 📢 {!! __('tg-notifier::events/github/issues.issue_title') !!}: {{ $issue->title }}
17 |
18 | @include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event'))
19 | @include('tg-notifier::events.shared.partials.github._body', compact('payload', 'event'))
20 |
--------------------------------------------------------------------------------
/resources/views/events/github/issues/reopened.blade.php:
--------------------------------------------------------------------------------
1 | issue;
8 | ?>
9 |
10 | ⚠️ {!! __('tg-notifier::events/github/issues.reopened.title', [
11 | 'issue' => "🦑 {$payload->repository->full_name}#$issue->number",
12 | 'user' => "@{$payload->sender->login}"
13 | ]
14 | ) !!}
15 |
16 | 📢 {!! __('tg-notifier::events/github/issues.issue_title') !!}: {{ $issue->title }}
17 |
18 | @include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event'))
19 | @include('tg-notifier::events.shared.partials.github._body', compact('payload', 'event'))
20 |
--------------------------------------------------------------------------------
/src/Traits/Markup.php:
--------------------------------------------------------------------------------
1 |
14 | */
15 | public function menuMarkup(Telegram $telegram): array
16 | {
17 | return [
18 | [
19 | $telegram->buildInlineKeyBoardButton('🗨 '.__('tg-notifier::tools/menu.discussion'), config('telegram-git-notifier.author.discussion')),
20 | ], [
21 | $telegram->buildInlineKeyBoardButton('💠 '.__('tg-notifier::tools/menu.source_code'), config('telegram-git-notifier.author.source_code')),
22 | ],
23 | ];
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/resources/views/events/github/pull_request_review/submitted.blade.php:
--------------------------------------------------------------------------------
1 | pull_request;
7 | ?>
8 |
9 | 👷♂️🛠️ {!! __('tg-notifier::events/github/pull_request_review.submitted.title', [
10 | 'repo' => "🦑{$payload->repository->full_name}#$pull_request->number",
11 | 'user' => "@{$payload->sender->login}"
12 | ]
13 | ) !!}
14 |
15 | 🛠 {!! __('tg-notifier::events/github/pull_request_review.name') !!}: {{ $pull_request->title }}
16 | 🔗 {!! __('tg-notifier::events/github/pull_request_review.link', ['review' => "#{$payload->review->id}"]) !!}
17 |
--------------------------------------------------------------------------------
/resources/views/events/github/pull_request_review/dismissed.blade.php:
--------------------------------------------------------------------------------
1 | pull_request;
7 | ?>
8 |
9 | 👷♂️🛠️ {!! __('tg-notifier::events/github/pull_request_review.dismissed.title', [
10 | 'repo' => "🦑{$payload->repository->full_name}#$pull_request->number",
11 | 'user' => "@{$payload->sender->login}"
12 | ]
13 | ) !!}
14 |
15 | 🛠 {!! __('tg-notifier ::events/github/pull_request_review.name') !!}: {{ $pull_request->title }}
16 | 🔗 {!! __('tg-notifier::events/github/pull_request_review.link', ['review' => "#{$payload->review->id}"]) !!}
17 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 | src/
13 |
14 |
15 |
16 |
17 | tests
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/job/default.blade.php:
--------------------------------------------------------------------------------
1 |
8 |
9 | 🛸 {{ __('tg-notifier::events/gitlab/job.title') }} 🦊
10 |
11 | 🚀 {{ __('tg-notifier::app.repo') }}: {{ $payload->project->path_with_namespace }}
12 | 🛸 {{ __('tg-notifier::events/gitlab/job.name') }}: {{ $payload->build_name }}
13 | 🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->project->default_branch }}
14 | 👤 {{ __('tg-notifier::app.author.name') }}: {{ $payload->commit->author_name }}
15 | 💻 {{ __('tg-notifier::app.commit') }}: {{ $payload->commit->message }}
16 | 🚦 {{ __('tg-notifier::app.status') }}: {{ $payload->build_status }}
17 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/issue/default.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 🔥 {!! __('tg-notifier::events/gitlab/issues.default', [
9 | 'issue' => "🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->id}",
10 | 'user' => "{$payload->user->name}"
11 | ]
12 | ) !!}
13 |
14 | 📢 {{ __('tg-notifier::app.title') }}: {{ $payload->object_attributes->title }}
15 | 📡 {{ __('tg-notifier::app.state') }}: {{ $payload->object_attributes->state }}
16 | @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
17 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
18 |
--------------------------------------------------------------------------------
/resources/views/events/github/pull_request/unlabeled.blade.php:
--------------------------------------------------------------------------------
1 | pull_request;
8 | $description = Str::limit($payload->label->description);
9 | ?>
10 |
11 | 👷♂️🛠️ {!! __('tg-notifier::events/github/pull_request.unlabeled.title', [
12 | 'repo' => "🦑{$payload->repository->full_name}#$pull_request->number",
13 | 'user' => "@{$payload->sender->login}"
14 | ]
15 | ) !!}
16 |
17 | 🔖 {!! __('tg-notifier::events/github/pull_request.labeled.name') !!}: {{ $payload->label->name }}
18 | 📑 {!! __('tg-notifier::events/github/pull_request.labeled.description') !!}: {{ $description }}
19 |
--------------------------------------------------------------------------------
/.github/workflows/phpstan.yml:
--------------------------------------------------------------------------------
1 | name: PHPStan
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | phpstan:
7 | runs-on: ${{ matrix.os }}
8 | name: PHPStan - P${{ matrix.php }}
9 |
10 | strategy:
11 | matrix:
12 | os: [ ubuntu-latest ]
13 | php: [ '8.1', '8.2', '8.3' ]
14 |
15 | steps:
16 | - uses: actions/checkout@v6
17 |
18 | - name: Setup PHP
19 | uses: shivammathur/setup-php@v2
20 | with:
21 | php-version: ${{ matrix.php }}
22 |
23 | - name: Checkout code
24 | uses: actions/checkout@v6
25 |
26 | - name: Install dependencies
27 | run: |
28 | composer install --no-interaction --no-progress --no-suggest
29 |
30 | - name: Run PHPStan
31 | run: |
32 | composer analyse --error-format=github
33 |
--------------------------------------------------------------------------------
/resources/views/events/github/issue_comment/deleted.blade.php:
--------------------------------------------------------------------------------
1 | issue;
8 | $event = 'issue';
9 | ?>
10 |
11 | @if(empty($issue->pull_request))
12 | 🗑 {!! __('tg-notifier::events/github/issue_comment.deleted.title', [
13 | 'issue' => "🦑 {$payload->repository->full_name}#$issue->number",
14 | 'user' => "@{$payload->sender->login}"
15 | ]
16 | ) !!}
17 |
18 | 📢 {!! __('tg-notifier::events/github/issue_comment.issue_comment_title') !!}: {{ $issue->title }}
19 | @include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event'))
20 | @else
21 | {{ config('telegram-git-notifier.view.ignore-message') }}
22 | @endif
23 |
--------------------------------------------------------------------------------
/lang/de/events/github/label.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'New Label :repo by :user',
6 | ],
7 | 'deleted' => [
8 | 'title' => 'Label Deleted - :repo by :user',
9 | ],
10 | 'edited' => [
11 | 'title' => 'Label has been edited - :repo by :user',
12 | 'changes' => [
13 | 'title' => [
14 | 'name' => 'Title has been changed',
15 | 'from' => 'From: :title_from',
16 | 'to' => 'To: :title_to',
17 | ],
18 | 'description' => [
19 | 'name' => 'Description has been changed',
20 | 'from' => 'From: :description_from',
21 | 'to' => 'To: :description_to',
22 | ],
23 | ],
24 | ],
25 | ];
26 |
--------------------------------------------------------------------------------
/lang/en/events/github/label.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'New Label :repo by :user',
6 | ],
7 | 'deleted' => [
8 | 'title' => 'Label Deleted - :repo by :user',
9 | ],
10 | 'edited' => [
11 | 'title' => 'Label has been edited - :repo by :user',
12 | 'changes' => [
13 | 'title' => [
14 | 'name' => 'Title has been changed',
15 | 'from' => 'From: :title_from',
16 | 'to' => 'To: :title_to',
17 | ],
18 | 'description' => [
19 | 'name' => 'Description has been changed',
20 | 'from' => 'From: :description_from',
21 | 'to' => 'To: :description_to',
22 | ],
23 | ],
24 | ],
25 | ];
26 |
--------------------------------------------------------------------------------
/lang/ja/events/github/label.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'New Label :repo by :user',
6 | ],
7 | 'deleted' => [
8 | 'title' => 'Label Deleted - :repo by :user',
9 | ],
10 | 'edited' => [
11 | 'title' => 'Label has been edited - :repo by :user',
12 | 'changes' => [
13 | 'title' => [
14 | 'name' => 'Title has been changed',
15 | 'from' => 'From: :title_from',
16 | 'to' => 'To: :title_to',
17 | ],
18 | 'description' => [
19 | 'name' => 'Description has been changed',
20 | 'from' => 'From: :description_from',
21 | 'to' => 'To: :description_to',
22 | ],
23 | ],
24 | ],
25 | ];
26 |
--------------------------------------------------------------------------------
/lang/vi/events/github/label.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'New Label :repo by :user',
6 | ],
7 | 'deleted' => [
8 | 'title' => 'Label Deleted - :repo by :user',
9 | ],
10 | 'edited' => [
11 | 'title' => 'Label has been edited - :repo by :user',
12 | 'changes' => [
13 | 'title' => [
14 | 'name' => 'Title has been changed',
15 | 'from' => 'From: :title_from',
16 | 'to' => 'To: :title_to',
17 | ],
18 | 'description' => [
19 | 'name' => 'Description has been changed',
20 | 'from' => 'From: :description_from',
21 | 'to' => 'To: :description_to',
22 | ],
23 | ],
24 | ],
25 | ];
26 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/pipeline/default.blade.php:
--------------------------------------------------------------------------------
1 |
8 |
9 | 🛰 {{ __('tg-notifier::events/gitlab/pipeline.title') }} 🦊
10 |
11 | 🚀 {{ __('tg-notifier::app.repo') }}: {{ $payload->project->path_with_namespace }}
12 | 🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->ref }}
13 | 👤 {{ __('tg-notifier::app.author.name') }}: {{ $payload->commit->author->name }}
14 | 💻 {{ __('tg-notifier::app.commit') }}: {{ $payload->commit->message }}
15 | 🚦 {{ __('tg-notifier::app.status') }}: Pipeline {{ $payload->object_attributes->status }} {{ $payload->object_attributes->duration ? "⏱️ {$payload->object_attributes->duration}s" : '' }}
16 |
--------------------------------------------------------------------------------
/.github/workflows/update-changelog.yml:
--------------------------------------------------------------------------------
1 | name: Update Changelog
2 |
3 | on:
4 | release:
5 | types: [released]
6 |
7 | permissions:
8 | contents: write
9 |
10 | jobs:
11 | update:
12 | runs-on: ubuntu-latest
13 |
14 | steps:
15 | - name: Checkout code
16 | uses: actions/checkout@v6
17 | with:
18 | ref: main
19 |
20 | - name: Update Changelog
21 | uses: stefanzweifel/changelog-updater-action@v1
22 | with:
23 | latest-version: ${{ github.event.release.name }}
24 | release-notes: ${{ github.event.release.body }}
25 |
26 | - name: Commit updated CHANGELOG
27 | uses: stefanzweifel/git-auto-commit-action@v7
28 | with:
29 | branch: main
30 | commit_message: Update CHANGELOG for ${{ github.event.release.name }}
31 | file_pattern: CHANGELOG.md
32 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/merge_request/close.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 🚫 {!! __('tg-notifier::events/gitlab/merge_request.closed.title', [
9 | 'repo' => "🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}",
10 | 'user' => "{$payload->user->name}"
11 | ]) !!}
12 |
13 | 🛠 {{ $payload->object_attributes->title }}
14 |
15 | 🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯
16 | @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
17 | @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload'))
18 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
19 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/merge_request/merge.blade.php:
--------------------------------------------------------------------------------
1 |
8 | ✅ {!! __('tg-notifier::events/gitlab/merge_request.merged.title', [
9 | 'repo' => "🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}",
10 | 'user' => "{$payload->user->name}"
11 | ]) !!}
12 |
13 | 🛠 {{ $payload->object_attributes->title }}
14 |
15 | 🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯
16 | @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
17 | @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload'))
18 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
19 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/merge_request/open.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 👷♂️🛠️ {!! __('tg-notifier::events/gitlab/merge_request.opened.title', [
9 | 'repo' => "🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}",
10 | 'user' => "{$payload->user->name}"
11 | ]) !!}
12 |
13 | 🛠 {{ $payload->object_attributes->title }}
14 |
15 | 🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯
16 | @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
17 | @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload'))
18 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
19 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/merge_request/update.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 🛠️ {!! __('tg-notifier::events/gitlab/merge_request.update.title', [
9 | 'repo' => "🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}",
10 | 'user' => "{$payload->user->name}"
11 | ]) !!}
12 |
13 | 🛠 {{ $payload->object_attributes->title }}
14 |
15 | 🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯
16 | @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
17 | @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload'))
18 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
19 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/confidential_issue/default.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 🔥 {!! __('tg-notifier::events/gitlab/issues.confidential_issue', [
9 | 'issue' => "🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->id}",
10 | 'user' => "{$payload->user->name}"
11 | ]
12 | ) !!}
13 |
14 | 📢 {{ __('tg-notifier::app.title') }}: {{ $payload->object_attributes->title }}
15 | 📡 {{ __('tg-notifier::app.state') }}: {{ $payload->object_attributes->state }}
16 | 🔒 {{ __('tg-notifier::app.confidential') }}: {{ $payload->object_attributes->confidential }}
17 | @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
18 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
19 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/merge_request/reopen.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 👷♂️🛠️ {!! __('tg-notifier::events/gitlab/merge_request.reopened.title', [
9 | 'repo' => "🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}",
10 | 'user' => "{$payload->user->name}"
11 | ]) !!}
12 |
13 | 🛠 {{ $payload->object_attributes->title }}
14 |
15 | 🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯
16 | @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
17 | @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload'))
18 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
19 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/merge_request/approval.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 👍 {!! __('tg-notifier::events/gitlab/merge_request.approval.title', [
9 | 'repo' => "✅ - 🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}",
10 | 'user' => "{$payload->user->name}"
11 | ]) !!}
12 |
13 | 🛠 {{ $payload->object_attributes->title }}
14 |
15 | 🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯
16 | @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
17 | @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload'))
18 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
19 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/merge_request/approved.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 👍 {!! __('tg-notifier::events/gitlab/merge_request.approved.title', [
9 | 'repo' => "✅ - 🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}",
10 | 'user' => "{$payload->user->name}"
11 | ]) !!}
12 |
13 | 🛠 {{ $payload->object_attributes->title }}
14 |
15 | 🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯
16 | @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
17 | @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload'))
18 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
19 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/merge_request/unapproval.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 👎 {!! __('tg-notifier::events/gitlab/merge_request.unapproval.title', [
9 | 'repo' => "❌ - 🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}",
10 | 'user' => "{$payload->user->name}"
11 | ]) !!}
12 |
13 | 🛠 {{ $payload->object_attributes->title }}
14 |
15 | 🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯
16 | @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
17 | @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload'))
18 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
19 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/merge_request/unapproved.blade.php:
--------------------------------------------------------------------------------
1 |
8 | 👎 {!! __('tg-notifier::events/gitlab/merge_request.unapproved.title', [
9 | 'repo' => "❌ - 🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}",
10 | 'user' => "{$payload->user->name}"
11 | ]) !!}
12 |
13 | 🛠 {{ $payload->object_attributes->title }}
14 |
15 | 🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯
16 | @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
17 | @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload'))
18 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
19 |
--------------------------------------------------------------------------------
/lang/de/events/gitlab/issues.php:
--------------------------------------------------------------------------------
1 | '📢',
5 | 'closed' => [
6 | 'title' => 'Issue Closed to :issue by :user',
7 | ],
8 | 'edited' => [
9 | 'title' => 'Issue has been edited to :issue by :user',
10 | 'changes' => [
11 | 'title' => [
12 | 'name' => 'Title has been changed',
13 | 'from' => 'From: :title_from',
14 | 'to' => 'To: :title_to',
15 | ],
16 | 'body' => [
17 | 'title' => 'Body has been changed',
18 | 'message' => 'Please check the issue for more details',
19 | ],
20 | ],
21 | ],
22 | 'opened' => [
23 | 'title' => 'New Issue to :issue by :user',
24 | ],
25 | 'reopened' => [
26 | 'title' => 'Issue has been reopened :issue by :user',
27 | ],
28 | ];
29 |
--------------------------------------------------------------------------------
/lang/ja/events/gitlab/issues.php:
--------------------------------------------------------------------------------
1 | '📢',
5 | 'closed' => [
6 | 'title' => 'Issue Closed to :issue by :user',
7 | ],
8 | 'edited' => [
9 | 'title' => 'Issue has been edited to :issue by :user',
10 | 'changes' => [
11 | 'title' => [
12 | 'name' => 'Title has been changed',
13 | 'from' => 'From: :title_from',
14 | 'to' => 'To: :title_to',
15 | ],
16 | 'body' => [
17 | 'title' => 'Body has been changed',
18 | 'message' => 'Please check the issue for more details',
19 | ],
20 | ],
21 | ],
22 | 'opened' => [
23 | 'title' => 'New Issue to :issue by :user',
24 | ],
25 | 'reopened' => [
26 | 'title' => 'Issue has been reopened :issue by :user',
27 | ],
28 | ];
29 |
--------------------------------------------------------------------------------
/lang/vi/events/gitlab/issues.php:
--------------------------------------------------------------------------------
1 | '📢',
5 | 'closed' => [
6 | 'title' => 'Vấn đề đã đóng trong :issue bởi :user',
7 | ],
8 | 'edited' => [
9 | 'title' => 'Vấn đề đã được chỉnh sửa trong :issue bởi :user',
10 | 'changes' => [
11 | 'title' => [
12 | 'name' => 'Tiêu đề đã được thay đổi',
13 | 'from' => 'Từ: :title_from',
14 | 'to' => 'Thành: :title_to',
15 | ],
16 | 'body' => [
17 | 'title' => 'Nội dung đã được thay đổi',
18 | 'message' => 'Vui lòng kiểm tra vấn đề để biết thêm chi tiết',
19 | ],
20 | ],
21 | ],
22 | 'opened' => [
23 | 'title' => 'Vấn đề mới trong :issue bởi :user',
24 | ],
25 | 'reopened' => [
26 | 'title' => 'Vấn đề đã được mở lại :issue bởi :user',
27 | ],
28 | ];
29 |
--------------------------------------------------------------------------------
/resources/views/events/github/workflow_run/completed.blade.php:
--------------------------------------------------------------------------------
1 | workflow_run->conclusion) {
7 | 'success' => $status = 'success',
8 | 'failure' => $status = 'failure',
9 | 'cancelled' => $status = 'cancelled',
10 | default => $status = 'default',
11 | };
12 | ?>
13 |
14 | {!! __("tg-notifier::events/github/workflow_run.completed.$status.title", ['repo' => "🦑{$payload->repository->full_name}"]) !!}
15 |
16 | {!! __("tg-notifier::events/github/workflow_run.completed.$status.body", ['name' => $payload->workflow_run->name]) !!}
17 | 📝 {!! __('tg-notifier::events/github/workflow_run.display_title') !!}: {!! $payload->workflow_run->display_title !!}
18 | 🔗 {!! __('tg-notifier::events/github/workflow_run.link', ['link' => "{$payload->workflow_run->event} - {$payload->workflow_run->name}"]) !!}
19 |
--------------------------------------------------------------------------------
/resources/views/events/github/issue_comment/edited.blade.php:
--------------------------------------------------------------------------------
1 | issue;
8 | $event = 'issue';
9 | ?>
10 |
11 | @if(empty($issue->pull_request))
12 | 📝 {!! __('tg-notifier::events/github/issue_comment.edited.title', [
13 | 'issue' => "🦑 {$payload->repository->full_name}#$issue->number",
14 | 'user' => "@{$payload->sender->login}"
15 | ]
16 | ) !!}
17 |
18 | 📢 {!! __('tg-notifier::events/github/issue_comment.issue_comment_title') !!}: {{ $issue->title }}
19 | @include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event'))
20 | 🔗 {!! __('tg-notifier::events/github/issue_comment.link') !!}: #{{ $payload->comment->id }}
21 | @else
22 | {{ config('telegram-git-notifier.view.ignore-message') }}
23 | @endif
24 |
--------------------------------------------------------------------------------
/resources/views/events/github/pull_request/opened.blade.php:
--------------------------------------------------------------------------------
1 | pull_request;
8 | ?>
9 |
10 | 👷♂️🛠️ {!! __('tg-notifier::events/github/pull_request.opened.title', [
11 | 'repo' => "🦑{$payload->repository->full_name}#$pull_request->number",
12 | 'user' => "@{$payload->sender->login}"
13 | ]
14 | ) !!}
15 |
16 | 🏷 {!! __('tg-notifier::events/github/pull_request.title') !!}: {{ $pull_request->title }}
17 |
18 | 🌳 {{ $pull_request->head->ref }} ➡ {{ $pull_request->base->ref }} 🎯
19 | @include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event'))
20 | @include('tg-notifier::events.github.pull_request.partials._reviewers', compact('payload'))
21 | @include('tg-notifier::events.shared.partials.github._body', compact('payload', 'event'))
22 |
--------------------------------------------------------------------------------
/resources/views/events/github/issue_comment/created.blade.php:
--------------------------------------------------------------------------------
1 | issue;
8 | $event = 'issue';
9 | ?>
10 |
11 | @if(empty($issue->pull_request))
12 | 💬 {!! __('tg-notifier::events/github/issue_comment.created.title', [
13 | 'issue' => "🦑 {$payload->repository->full_name}#$issue->number",
14 | 'user' => "@{$payload->sender->login}"
15 | ]
16 | ) !!}
17 | {{ $event }}
18 | 📢 {!! __('tg-notifier::events/github/issue_comment.issue_comment_title') !!}: {{ $issue->title }}
19 | @include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event'))
20 | 🔗 {!! __('tg-notifier::events/github/issue_comment.link') !!}: #{{ $payload->comment->id }}
21 | @else
22 | {{ config('telegram-git-notifier.view.ignore-message') }}
23 | @endif
24 |
25 |
--------------------------------------------------------------------------------
/resources/views/events/github/pull_request/reopened.blade.php:
--------------------------------------------------------------------------------
1 | pull_request;
8 | ?>
9 |
10 | 👷♂️🛠️ {!! __('tg-notifier::events/github/pull_request.reopened.title', [
11 | 'repo' => "🦑{$payload->repository->full_name}#$pull_request->number",
12 | 'user' => "@{$payload->sender->login}"
13 | ]
14 | ) !!}
15 |
16 | 🏷 {!! __('tg-notifier::events/github/pull_request.title') !!}: {{ $pull_request->title }}
17 |
18 | 🌳 {{ $pull_request->head->ref }} ➡ {{ $pull_request->base->ref }} 🎯
19 | @include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event'))
20 | @include('tg-notifier::events.github.pull_request.partials._reviewers', compact('payload'))
21 | @include('tg-notifier::events.shared.partials.github._body', compact('payload', 'event'))
22 |
--------------------------------------------------------------------------------
/resources/views/events/github/team/removed_from_repository.blade.php:
--------------------------------------------------------------------------------
1 |
8 |
9 | ⚡ {!! __('tg-notifier::events/github/team.removed_from_repository.title') !!} 🎊
10 |
11 | @if(isset($payload->organization))
12 | 🏢 {!! __('tg-notifier::events/github/team.removed_from_repository.organization') !!}: {{ $payload->organization->login }}
13 | @endif
14 | @if(isset($payload->repository))
15 | 📦 {!! __('tg-notifier::events/github/team.removed_from_repository.full_name') !!}: 🦑{{ $payload->repository->full_name }}
16 | @endif
17 | @if(isset($payload->sender))
18 | 👤 {!! __('tg-notifier::events/github/team.removed_from_repository.sender') !!}: {{ $payload->sender->login }}
19 | @endif
20 | @if(isset($payload->team))
21 | 👥 {!! __('tg-notifier::events/github/team.removed_from_repository.team') !!}: {{ $payload->team->name }}
22 | @endif
23 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/feature_flag/default.blade.php:
--------------------------------------------------------------------------------
1 | project->web_url."/-/feature_flags/".$payload->object_attributes->id;
8 | $flatTag = "{$payload->project->path_with_namespace}#{$payload->object_attributes->name}";
9 | $userTag = "user_url}\">{$payload->user->name}";
10 |
11 | if ($payload->object_attributes->active) {
12 | $active = "enabled";
13 | $icon = "🚩";
14 | } else {
15 | $active = "disabled";
16 | $icon = "🏴";
17 | }
18 | ?>
19 |
20 | {!! $icon !!} {!! __('tg-notifier::events/gitlab/feature_flag.title'.$active, [
21 | 'flag_tag' => '🦊'.$flagTag,
22 | 'user_tag' => $userTag,
23 | ]) !!}
24 |
25 | {!! $icon !!} {!! __('tg-notifier::events/gitlab/feature_flag.name', ['flag_name' => $payload->object_attributes->name]) !!}
26 |
27 | @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
28 |
--------------------------------------------------------------------------------
/.scrutinizer.yml:
--------------------------------------------------------------------------------
1 | build:
2 | nodes:
3 | analysis:
4 | project_setup:
5 | override: true
6 | tests:
7 | override: [ php-scrutinizer-run ]
8 | environment:
9 | php:
10 | version: 8.0
11 |
12 | checks:
13 | php:
14 | code_rating: true
15 | remove_extra_empty_lines: true
16 | remove_php_closing_tag: true
17 | remove_trailing_whitespace: true
18 | fix_use_statements:
19 | remove_unused: true
20 | preserve_multiple: false
21 | preserve_blanklines: true
22 | order_alphabetically: true
23 | fix_php_opening_tag: true
24 | fix_linefeed: true
25 | fix_line_ending: true
26 | fix_identation_4spaces: true
27 | fix_doc_comments: true
28 |
29 | tools:
30 | php_analyzer: true
31 | php_code_coverage: true
32 | php_code_sniffer:
33 | config:
34 | standard: PSR4
35 | filter:
36 | paths: [ 'src' ]
37 | php_loc:
38 | enabled: true
39 | excluded_dirs: [ vendor ]
40 | php_cpd:
41 | enabled: true
42 | excluded_dirs: [ vendor ]
43 |
--------------------------------------------------------------------------------
/lang/de/events/gitlab/merge_request.php:
--------------------------------------------------------------------------------
1 | 'Reviewers: ',
5 | 'closed' => [
6 | 'title' => 'Merge Request Closed - :repo by :user',
7 | ],
8 | 'merged' => [
9 | 'title' => 'Merge Request Merged - :repo by :user',
10 | ],
11 | 'opened' => [
12 | 'title' => 'New Merge Request - :repo by :user',
13 | ],
14 | 'reopened' => [
15 | 'title' => 'Merge Request Reopened - :repo by :user',
16 | ],
17 | 'approved' => [
18 | 'title' => 'Merge Request Approved :repo by :user',
19 | ],
20 | 'unapproved' => [
21 | 'title' => 'Merge Request Unapproved :repo by :user',
22 | ],
23 | 'approval' => [
24 | 'title' => 'Merge Request Approval :repo by :user',
25 | ],
26 | 'unapproval' => [
27 | 'title' => 'Merge Request Unapproval :repo by :user',
28 | ],
29 | 'update' => [
30 | 'title' => 'Merge Request Updated - :repo by :user',
31 | ],
32 | ];
33 |
--------------------------------------------------------------------------------
/lang/ja/events/gitlab/merge_request.php:
--------------------------------------------------------------------------------
1 | 'Reviewers: ',
5 | 'closed' => [
6 | 'title' => 'Merge Request Closed - :repo by :user',
7 | ],
8 | 'merged' => [
9 | 'title' => 'Merge Request Merged - :repo by :user',
10 | ],
11 | 'opened' => [
12 | 'title' => 'New Merge Request - :repo by :user',
13 | ],
14 | 'reopened' => [
15 | 'title' => 'Merge Request Reopened - :repo by :user',
16 | ],
17 | 'approved' => [
18 | 'title' => 'Merge Request Approved :repo by :user',
19 | ],
20 | 'unapproved' => [
21 | 'title' => 'Merge Request Unapproved :repo by :user',
22 | ],
23 | 'approval' => [
24 | 'title' => 'Merge Request Approval :repo by :user',
25 | ],
26 | 'unapproval' => [
27 | 'title' => 'Merge Request Unapproval :repo by :user',
28 | ],
29 | 'update' => [
30 | 'title' => 'Merge Request Updated - :repo by :user',
31 | ],
32 | ];
33 |
--------------------------------------------------------------------------------
/lang/de/events/github/workflow_run.php:
--------------------------------------------------------------------------------
1 | [
5 | 'success' => [
6 | 'title' => '🎉 Workflow Completed from :repo',
7 | 'body' => 'Done workflow: 🎉 :name ✨ ',
8 | ],
9 | 'failure' => [
10 | 'title' => '🚫 Workflow Failed from :repo',
11 | 'body' => 'Failed workflow: 🚫 :name ❌',
12 | ],
13 | 'cancelled' => [
14 | 'title' => '❌ Workflow Cancelled from :repo',
15 | 'body' => 'Cancelled workflow: 🚨 :name ❌ ',
16 | ],
17 | 'default' => [
18 | 'title' => "🚨 Workflow Can't Success from :repo",
19 | 'body' => "Can't Success workflow: 🚨 :name ❌",
20 | ],
21 | ],
22 | 'requested' => [
23 | 'title' => ' Workflow Requested from :repo',
24 | 'body' => 'Running workflow',
25 | ],
26 | 'link' => 'Workflow run link: :link',
27 | 'display_title' => 'Title',
28 | ];
29 |
--------------------------------------------------------------------------------
/lang/en/events/github/workflow_run.php:
--------------------------------------------------------------------------------
1 | [
5 | 'success' => [
6 | 'title' => '🎉 Workflow Completed from :repo',
7 | 'body' => 'Done workflow: 🎉 :name ✨ ',
8 | ],
9 | 'failure' => [
10 | 'title' => '🚫 Workflow Failed from :repo',
11 | 'body' => 'Failed workflow: 🚫 :name ❌',
12 | ],
13 | 'cancelled' => [
14 | 'title' => '❌ Workflow Cancelled from :repo',
15 | 'body' => 'Cancelled workflow: 🚨 :name ❌ ',
16 | ],
17 | 'default' => [
18 | 'title' => "🚨 Workflow Can't Success from :repo",
19 | 'body' => "Can't Success workflow: 🚨 :name ❌",
20 | ],
21 | ],
22 | 'requested' => [
23 | 'title' => ' Workflow Requested from :repo',
24 | 'body' => 'Running workflow',
25 | ],
26 | 'link' => 'Workflow run link: :link',
27 | 'display_title' => 'Title',
28 | ];
29 |
--------------------------------------------------------------------------------
/lang/ja/events/github/workflow_run.php:
--------------------------------------------------------------------------------
1 | [
5 | 'success' => [
6 | 'title' => '🎉 Workflow Completed from :repo',
7 | 'body' => 'Done workflow: 🎉 :name ✨ ',
8 | ],
9 | 'failure' => [
10 | 'title' => '🚫 Workflow Failed from :repo',
11 | 'body' => 'Failed workflow: 🚫 :name ❌',
12 | ],
13 | 'cancelled' => [
14 | 'title' => '❌ Workflow Cancelled from :repo',
15 | 'body' => 'Cancelled workflow: 🚨 :name ❌ ',
16 | ],
17 | 'default' => [
18 | 'title' => "🚨 Workflow Can't Success from :repo",
19 | 'body' => "Can't Success workflow: 🚨 :name ❌",
20 | ],
21 | ],
22 | 'requested' => [
23 | 'title' => ' Workflow Requested from :repo',
24 | 'body' => 'Running workflow',
25 | ],
26 | 'link' => 'Workflow run link: :link',
27 | 'display_title' => 'Title',
28 | ];
29 |
--------------------------------------------------------------------------------
/lang/vi/events/github/workflow_run.php:
--------------------------------------------------------------------------------
1 | [
5 | 'success' => [
6 | 'title' => '🎉 Workflow Completed from :repo',
7 | 'body' => 'Done workflow: 🎉 :name ✨ ',
8 | ],
9 | 'failure' => [
10 | 'title' => '🚫 Workflow Failed from :repo',
11 | 'body' => 'Failed workflow: 🚫 :name ❌',
12 | ],
13 | 'cancelled' => [
14 | 'title' => '❌ Workflow Cancelled from :repo',
15 | 'body' => 'Cancelled workflow: 🚨 :name ❌ ',
16 | ],
17 | 'default' => [
18 | 'title' => "🚨 Workflow Can't Success from :repo",
19 | 'body' => "Can't Success workflow: 🚨 :name ❌",
20 | ],
21 | ],
22 | 'requested' => [
23 | 'title' => ' Workflow Requested from :repo',
24 | 'body' => 'Running workflow',
25 | ],
26 | 'link' => 'Workflow run link: :link',
27 | 'display_title' => 'Title',
28 | ];
29 |
--------------------------------------------------------------------------------
/src/Commands/SetWebhook.php:
--------------------------------------------------------------------------------
1 | info($webhookService->setWebhook());
36 | } catch (WebhookException $e) {
37 | $this->error($e->getMessage());
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/resources/views/events/shared/partials/gitlab/_body.blade.php:
--------------------------------------------------------------------------------
1 | object_attributes->description)) {
12 | $body = $payload->object_attributes->description;
13 | } elseif (!empty($payload->object_attributes->content)) {
14 | $body = $payload->object_attributes->content;
15 | } elseif (!empty($payload->object_attributes->note)) {
16 | $body = $payload->object_attributes->note;
17 | } elseif (!empty($payload->object_attributes->body)) {
18 | $body = $payload->object_attributes->body;
19 | } elseif (!empty($payload->description)) {
20 | $body = $payload->description;
21 | } else {
22 | return '';
23 | }
24 | $html = htmlentities(Str::limit($body));
25 | }
26 | ?>
27 | @if(!empty($html))
28 | 📖 {!! __('tg-notifier::events/shared/gitlab._body.title') !!}:
29 | {!! $html !!}
30 | @endif
31 |
32 |
--------------------------------------------------------------------------------
/lang/en/events/gitlab/issues.php:
--------------------------------------------------------------------------------
1 | '📢',
5 | 'default' => 'Default issue to :issue by :user',
6 | 'confidential_issue' => '🔒 Confidential Issue to :issue by :user',
7 | 'closed' => [
8 | 'title' => 'Issue Closed to :issue by :user',
9 | ],
10 | 'edited' => [
11 | 'title' => 'Issue has been edited to :issue by :user',
12 | 'changes' => [
13 | 'title' => [
14 | 'name' => 'Title has been changed',
15 | 'from' => 'From: :title_from',
16 | 'to' => 'To: :title_to',
17 | ],
18 | 'body' => [
19 | 'title' => 'Body has been changed',
20 | 'message' => 'Please check the issue for more details',
21 | ],
22 | ],
23 | ],
24 | 'opened' => [
25 | 'title' => 'New Issue to :issue by :user',
26 | ],
27 | 'reopened' => [
28 | 'title' => 'Issue has been reopened :issue by :user',
29 | ],
30 | ];
31 |
--------------------------------------------------------------------------------
/resources/views/events/github/team/added_to_repository.blade.php:
--------------------------------------------------------------------------------
1 |
8 |
9 | ⚡ {!! __('tg-notifier::events/github/team.added_to_repository.title') !!} 🎊
10 |
11 | @if(isset($payload->organization))
12 | 🏢 {!! __('tg-notifier::events/github/team.added_to_repository.organization') !!}: {{ $payload->organization->login }}
13 | @endif
14 | @if(isset($payload->repository))
15 | 📦 {!! __('tg-notifier::events/github/team.added_to_repository.full_name') !!}: 🦑{{ $payload->repository->full_name }}
16 | 📄 {!! __('tg-notifier::events/github/team.added_to_repository.role_name') !!}: {{ $payload->repository->role_name }}
17 | @endif
18 | @if(isset($payload->sender))
19 | 👤 {!! __('tg-notifier::events/github/team.added_to_repository.sender') !!}: {{ $payload->sender->login }}
20 | @endif
21 | @if(isset($payload->team))
22 | 👥 {!! __('tg-notifier::events/github/team.added_to_repository.team') !!}: {{ $payload->team->name }}
23 | @endif
24 |
--------------------------------------------------------------------------------
/.github/workflows/setup_test.yml:
--------------------------------------------------------------------------------
1 | name: Setup & test
2 |
3 | on: [ push, pull_request ]
4 |
5 | jobs:
6 | tests:
7 | name: Composer P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.os }}
8 | runs-on: ${{ matrix.os }}
9 | strategy:
10 | matrix:
11 | os: [ ubuntu-latest ]
12 | php: [ '8.1', '8.2', '8.3' ]
13 | laravel: [ 11.*, 10.*, 9.* ]
14 | include:
15 | - laravel: 11.*
16 | testbench: 9.*
17 | - laravel: 10.*
18 | testbench: 8.*
19 | - laravel: 9.*
20 | testbench: 8.*
21 | exclude:
22 | - laravel: 11.*
23 | php: 8.1
24 | steps:
25 | - name: Setup PHP
26 | uses: shivammathur/setup-php@v2
27 | with:
28 | php-version: ${{ matrix.php }}
29 |
30 | - name: Checkout code
31 | uses: actions/checkout@v6
32 |
33 | - name: Install dependencies
34 | run: |
35 | composer install --no-interaction --no-progress --no-suggest
36 |
37 | - name: Run tests
38 | run: |
39 | composer validate --strict
40 |
--------------------------------------------------------------------------------
/lang/en/events/gitlab/merge_request.php:
--------------------------------------------------------------------------------
1 | 'Reviewers: ',
5 | 'closed' => [
6 | 'title' => 'Merge Request Closed - :repo by :user',
7 | ],
8 | 'merged' => [
9 | 'title' => 'Merge Request Merged - :repo by :user',
10 | ],
11 | 'opened' => [
12 | 'title' => 'New Merge Request - :repo by :user',
13 | ],
14 | 'reopened' => [
15 | 'title' => 'Merge Request Reopened - :repo by :user',
16 | ],
17 | 'approved' => [
18 | 'title' => 'Merge Request Approved :repo by :user',
19 | ],
20 | 'unapproved' => [
21 | 'title' => 'Merge Request Unapproved :repo by :user',
22 | ],
23 | 'approval' => [
24 | 'title' => 'Merge Request Approval :repo by :user',
25 | ],
26 | 'unapproval' => [
27 | 'title' => 'Merge Request Unapproval :repo by :user',
28 | ],
29 | 'update' => [
30 | 'title' => 'Merge Request Updated - :repo by :user',
31 | ],
32 | 'default' => 'Here is the default message for merge request',
33 | ];
34 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 CSlant
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/resources/views/events/github/branch_protection_rule/edited.blade.php:
--------------------------------------------------------------------------------
1 | repository;
7 | ?>
8 |
9 | 📝 {!! __('tg-notifier::events/github/branch_protection_rule.edited.title', [
10 | 'repo' => "🦑$repository->full_name"
11 | ]
12 | ) !!}
13 |
14 | @if(isset($payload->changes->name->from))
15 | 📖 {!! __('tg-notifier::events/github/branch_protection_rule.edited.changes.title.name') !!}
16 | 📝 {!! __('tg-notifier::events/github/issues.edited.changes.title.from', ['title_from' => $payload->changes->name->from]) !!}
17 | 🛡 {!! __('tg-notifier::events/github/issues.edited.changes.title.to', ['title_to' => $payload->rule->name]) !!}
18 | @else
19 | 🛡 {!! __('tg-notifier::events/github/branch_protection_rule.name') !!}: {{ $payload->rule->name }}
20 | @endif
21 | 🔗 {!! __('tg-notifier::events/github/branch_protection_rule.edited.link', [
22 | 'link' => "#{$payload->rule->id}"
23 | ]
24 | ) !!}
25 |
--------------------------------------------------------------------------------
/lang/vi/events/gitlab/merge_request.php:
--------------------------------------------------------------------------------
1 | 'Người đánh giá: ',
5 | 'closed' => [
6 | 'title' => 'Yêu cầu hợp nhất đã đóng - :repo bởi :user',
7 | ],
8 | 'merged' => [
9 | 'title' => 'Yêu cầu hợp nhất Đã hợp nhất - :repo bởi :user',
10 | ],
11 | 'opened' => [
12 | 'title' => 'Yêu cầu hợp nhất mới - :repo bởi :user',
13 | ],
14 | 'reopened' => [
15 | 'title' => 'Yêu cầu hợp nhất đã được mở lại - :repo bởi :user',
16 | ],
17 | 'approved' => [
18 | 'title' => 'Yêu cầu hợp nhất đã được phê duyệt :repo bởi :user',
19 | ],
20 | 'unapproved' => [
21 | 'title' => 'Yêu cầu hợp nhất không được phê duyệt :repo bởi :user',
22 | ],
23 | 'approval' => [
24 | 'title' => 'Phê duyệt yêu cầu hợp nhất :repo bởi :user',
25 | ],
26 | 'unapproval' => [
27 | 'title' => 'Yêu cầu hợp nhất không được phê duyệt :repo bởi :user',
28 | ],
29 | 'update' => [
30 | 'title' => 'Đã cập nhật yêu cầu hợp nhất - :repo bởi :user',
31 | ],
32 | ];
33 |
--------------------------------------------------------------------------------
/phpstan-baseline.neon:
--------------------------------------------------------------------------------
1 | parameters:
2 | ignoreErrors:
3 | - message: '#Parameter \#2 \$namespace of method Illuminate\\Support\\ServiceProvider\:\:loadViewsFrom\(\) expects string, mixed given\.#'
4 | path: src/Providers/TelegramGitNotifierServiceProvider.php
5 |
6 | - message: '#Parameter \#1 \$token of method CSlant\\TelegramGitNotifier\\Interfaces\\WebhookInterface\:\:setToken\(\) expects string, mixed given\.#'
7 | path: src/Services/WebhookService.php
8 |
9 | - message: '#Parameter \#1 \$url of method CSlant\\TelegramGitNotifier\\Interfaces\\WebhookInterface\:\:setUrl\(\) expects string, mixed given\.#'
10 | path: src/Services/WebhookService.php
11 |
12 | - message: '#Parameter \#1 \$prefix of static method Illuminate\\Support\\Facades\\Route::prefix\(\) expects string, mixed given\.#'
13 | path: routes/bot.php
14 |
15 | - message: '#Part \$routePrefix \(mixed\) of encapsed string cannot be cast to string\.#'
16 | path: routes/bot.php
17 |
18 | - message: '#Property .+ does not accept mixed#'
19 | path: %currentWorkingDirectory%/src/Services/*.php
20 |
--------------------------------------------------------------------------------
/.github/workflows/dependabot-auto-merge.yml:
--------------------------------------------------------------------------------
1 | name: Dependabot auto-merge
2 | on: pull_request_target
3 |
4 | permissions:
5 | pull-requests: write
6 | contents: write
7 |
8 | jobs:
9 | dependabot:
10 | runs-on: ubuntu-latest
11 | if: ${{ github.actor == 'dependabot[bot]' }}
12 | steps:
13 |
14 | - name: Dependabot metadata
15 | id: metadata
16 | uses: dependabot/fetch-metadata@v2.4.0
17 | with:
18 | github-token: "${{ secrets.GITHUB_TOKEN }}"
19 |
20 | - name: Auto-merge Dependabot PRs for semver-major updates
21 | if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
22 | run: gh pr merge --auto --merge "$PR_URL"
23 | env:
24 | PR_URL: ${{github.event.pull_request.html_url}}
25 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
26 |
27 | - name: Auto-merge Dependabot PRs for semver-patch updates
28 | if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
29 | run: gh pr merge --auto --merge "$PR_URL"
30 | env:
31 | PR_URL: ${{github.event.pull_request.html_url}}
32 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
33 |
--------------------------------------------------------------------------------
/lang/de/events/github/team.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Team added to repository successfully',
6 | 'organization' => 'Organization',
7 | 'full_name' => 'Repository',
8 | 'role_name' => 'Role',
9 | 'sender' => 'Sender',
10 | 'team' => 'Team',
11 | ],
12 | 'created' => [
13 | 'title' => 'Team created successfully',
14 | 'organization' => 'Organization',
15 | 'sender' => 'Sender',
16 | 'team' => 'Team',
17 | ],
18 | 'deleted' => [
19 | 'title' => 'Team deleted successfully',
20 | 'organization' => 'Organization',
21 | 'sender' => 'Sender',
22 | 'team' => 'Team',
23 | ],
24 | 'edited' => [
25 | 'title' => 'Team edited successfully',
26 | 'organization' => 'Organization',
27 | 'sender' => 'Sender',
28 | 'team' => 'Team',
29 | ],
30 | 'removed_from_repository' => [
31 | 'title' => 'Team removed from repository successfully',
32 | 'organization' => 'Organization',
33 | 'full_name' => 'Repository',
34 | 'sender' => 'Sender',
35 | 'team' => 'Team',
36 | ],
37 | ];
38 |
--------------------------------------------------------------------------------
/lang/en/events/github/team.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Team added to repository successfully',
6 | 'organization' => 'Organization',
7 | 'full_name' => 'Repository',
8 | 'role_name' => 'Role',
9 | 'sender' => 'Sender',
10 | 'team' => 'Team',
11 | ],
12 | 'created' => [
13 | 'title' => 'Team created successfully',
14 | 'organization' => 'Organization',
15 | 'sender' => 'Sender',
16 | 'team' => 'Team',
17 | ],
18 | 'deleted' => [
19 | 'title' => 'Team deleted successfully',
20 | 'organization' => 'Organization',
21 | 'sender' => 'Sender',
22 | 'team' => 'Team',
23 | ],
24 | 'edited' => [
25 | 'title' => 'Team edited successfully',
26 | 'organization' => 'Organization',
27 | 'sender' => 'Sender',
28 | 'team' => 'Team',
29 | ],
30 | 'removed_from_repository' => [
31 | 'title' => 'Team removed from repository successfully',
32 | 'organization' => 'Organization',
33 | 'full_name' => 'Repository',
34 | 'sender' => 'Sender',
35 | 'team' => 'Team',
36 | ],
37 | ];
38 |
--------------------------------------------------------------------------------
/lang/ja/events/github/team.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Team added to repository successfully',
6 | 'organization' => 'Organization',
7 | 'full_name' => 'Repository',
8 | 'role_name' => 'Role',
9 | 'sender' => 'Sender',
10 | 'team' => 'Team',
11 | ],
12 | 'created' => [
13 | 'title' => 'Team created successfully',
14 | 'organization' => 'Organization',
15 | 'sender' => 'Sender',
16 | 'team' => 'Team',
17 | ],
18 | 'deleted' => [
19 | 'title' => 'Team deleted successfully',
20 | 'organization' => 'Organization',
21 | 'sender' => 'Sender',
22 | 'team' => 'Team',
23 | ],
24 | 'edited' => [
25 | 'title' => 'Team edited successfully',
26 | 'organization' => 'Organization',
27 | 'sender' => 'Sender',
28 | 'team' => 'Team',
29 | ],
30 | 'removed_from_repository' => [
31 | 'title' => 'Team removed from repository successfully',
32 | 'organization' => 'Organization',
33 | 'full_name' => 'Repository',
34 | 'sender' => 'Sender',
35 | 'team' => 'Team',
36 | ],
37 | ];
38 |
--------------------------------------------------------------------------------
/lang/vi/events/github/team.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Team added to repository successfully',
6 | 'organization' => 'Organization',
7 | 'full_name' => 'Repository',
8 | 'role_name' => 'Role',
9 | 'sender' => 'Sender',
10 | 'team' => 'Team',
11 | ],
12 | 'created' => [
13 | 'title' => 'Team created successfully',
14 | 'organization' => 'Organization',
15 | 'sender' => 'Sender',
16 | 'team' => 'Team',
17 | ],
18 | 'deleted' => [
19 | 'title' => 'Team deleted successfully',
20 | 'organization' => 'Organization',
21 | 'sender' => 'Sender',
22 | 'team' => 'Team',
23 | ],
24 | 'edited' => [
25 | 'title' => 'Team edited successfully',
26 | 'organization' => 'Organization',
27 | 'sender' => 'Sender',
28 | 'team' => 'Team',
29 | ],
30 | 'removed_from_repository' => [
31 | 'title' => 'Team removed from repository successfully',
32 | 'organization' => 'Organization',
33 | 'full_name' => 'Repository',
34 | 'sender' => 'Sender',
35 | 'team' => 'Team',
36 | ],
37 | ];
38 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/issue/update.blade.php:
--------------------------------------------------------------------------------
1 |
8 | ⚠️ {!! __('tg-notifier::events/gitlab/issues.edited.title', [
9 | 'issue' => "🦊 {$payload->project->path_with_namespace}#{$payload->object_attributes->id}",
10 | 'user' => "{$payload->user->name}"
11 | ]
12 | ) !!}
13 |
14 | 📢 {{ __('tg-notifier::app.title') }}: {{ $payload->object_attributes->title }}
15 | @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
16 | @if(isset($payload->changes->title))
17 | 📖 {!! __('tg-notifier::events/gitlab/issues.edited.changes.title.name') !!}
18 | 📝 {!! __('tg-notifier::events/gitlab/issues.edited.changes.title.from', ['title_from' => $payload->changes->title->previous]) !!}
19 | 🏷 {!! __('tg-notifier::events/gitlab/issues.edited.changes.title.to', ['title_to' => $payload->changes->title->current]) !!}
20 | @endif
21 | @if(isset($payload->changes->description))
22 | 📖 {!! __('tg-notifier::events/gitlab/issues.edited.changes.body.title') !!}
23 | {!! __('tg-notifier::events/gitlab/issues.edited.changes.body.message') !!}
24 | @endif
25 |
--------------------------------------------------------------------------------
/resources/views/events/github/issues/edited.blade.php:
--------------------------------------------------------------------------------
1 | issue;
8 | ?>
9 |
10 | ⚠️ {!! __('tg-notifier::events/github/issues.edited.title', [
11 | 'issue' => "🦑 {$payload->repository->full_name}#$issue->number",
12 | 'user' => "@{$payload->sender->login}"
13 | ]
14 | ) !!}
15 |
16 | 📢 {!! __('tg-notifier::events/github/issues.issue_title') !!}: {{ $issue->title }}
17 |
18 | @include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event'))
19 | @if(isset($payload->changes->title))
20 | 📖 {!! __('tg-notifier::events/github/issues.edited.changes.title.name') !!}
21 | 📝 {!! __('tg-notifier::events/github/issues.edited.changes.title.from', ['title_from' => $payload->changes->title->from]) !!}
22 | 🏷 {!! __('tg-notifier::events/github/issues.edited.changes.title.to', ['title_to' => $payload->issue->title]) !!}
23 | @elseif(isset($payload->changes->body))
24 | 📖 {!! __('tg-notifier::events/github/issues.edited.changes.body.title') !!}
25 | {!! __('tg-notifier::events/github/issues.edited.changes.body.message') !!}
26 | @endif
27 |
--------------------------------------------------------------------------------
/resources/views/events/github/pull_request/closed.blade.php:
--------------------------------------------------------------------------------
1 | pull_request;
8 |
9 | $message = '✅ '.__('tg-notifier::events/github/pull_request.closed.title_merged');
10 | if (!isset($payload->pull_request->merged) || $payload->pull_request->merged !== true) {
11 | $message = '🚫 '.__('tg-notifier::events/github/pull_request.closed.title_closed');
12 | }
13 | ?>
14 |
15 | {!! __('tg-notifier::events/github/pull_request.closed.title', [
16 | 'title' => $message,
17 | 'repo' => "🦑{$payload->repository->full_name}#$pull_request->number",
18 | 'user' => "@{$payload->sender->login}"
19 | ]) !!}
20 |
21 | 🏷 {!! __('tg-notifier::events/github/pull_request.title') !!}: {{ $pull_request->title }}
22 |
23 | 🌳 {{ $pull_request->head->ref }} ➡ {{ $pull_request->base->ref }} 🎯
24 | @include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event'))
25 | @include('tg-notifier::events.github.pull_request.partials._reviewers', compact('payload'))
26 | @include('tg-notifier::events.shared.partials.github._body', compact('payload', 'event'))
27 |
--------------------------------------------------------------------------------
/resources/views/events/github/workflow_job/completed.blade.php:
--------------------------------------------------------------------------------
1 | workflow_job->conclusion === 'success') {
7 | $status = 'success';
8 | $icon = '🎉';
9 | $last = '✨';
10 | } else {
11 | $status = 'failure';
12 | $icon = '🚫';
13 | $last = '❌';
14 | }
15 |
16 | $startedAt = new DateTime($payload->workflow_job->started_at);
17 | $completedAt = new DateTime($payload->workflow_job->completed_at);
18 | $interval = $completedAt->diff($startedAt);
19 | $allSeconds = $interval->s + $interval->i * 60 + $interval->h * 3600;
20 | ?>
21 |
22 | {{ $icon }} {!! __("tg-notifier::events/github/workflow_job.completed.$status", ['repo' => "🦑{$payload->repository->full_name}"]) !!}
23 |
24 | 🚀 {!! __('tg-notifier::events/github/workflow_job.name') !!}: {{ $icon }} {{ $payload->workflow_job->name }} {{ $last }}
25 | 🚨 {!! __('tg-notifier::events/github/workflow_job.status.title') !!}: {!! __('tg-notifier::events/github/workflow_job.status.'.$status) !!} ⏱️ {{ $allSeconds }}s
26 | 🔗 {!! __('tg-notifier::events/github/workflow_job.link', ['link' => "{$payload->workflow_job->workflow_name}"]) !!}
27 |
--------------------------------------------------------------------------------
/routes/bot.php:
--------------------------------------------------------------------------------
1 | name("$routePrefix.")->group(function () {
21 | Route::match(['get', 'post'], '/', IndexAction::class)->name('index');
22 |
23 | Route::prefix('webhook')->name('webhook.')->group(function () {
24 | Route::get('set', [WebhookAction::class, 'set'])->name('set');
25 | Route::get('delete', [WebhookAction::class, 'delete'])->name('delete');
26 | Route::get('info', [WebhookAction::class, 'getWebHookInfo'])->name('info');
27 | Route::get('updates', [WebhookAction::class, 'getUpdates'])->name('updates');
28 | });
29 | });
30 |
--------------------------------------------------------------------------------
/lang/de/tools/usage.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Adding webhook (Web Address) to GitHub repositories 🦑',
6 | 'webhookSetupSteps' => [
7 | '1) Redirect to Repository Settings->Webhooks->Add Webhook.',
8 | '2) Set your Payload URL.',
9 | '3) Set content type to \"application/x-www-form-urlencoded\".',
10 | '4) Choose events you would like to trigger in this webhook. (Recommended: Let me select individual events, and choose any events you want).',
11 | '5) Check Active checkbox. And click Add Webhook.',
12 | ],
13 | ],
14 | 'gitlab' => [
15 | 'title' => 'Adding webhook (Web Address) to GitLab repositories 🦊',
16 | 'webhookSetupSteps' => [
17 | '1) Redirect to Repository Settings->Webhooks->Add new webhook.',
18 | '2) Set your Payload URL.',
19 | '3) Choose events you would like to trigger in this webhook.',
20 | '4) Check Enable SSL verification if you are using SSL. And click Add Webhook.',
21 | ],
22 | ],
23 | 'completionMessage' => 'That it. you will receive all notifications through me 🤗',
24 | ];
25 |
--------------------------------------------------------------------------------
/lang/en/tools/usage.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Adding webhook (Web Address) to GitHub repositories 🦑',
6 | 'webhookSetupSteps' => [
7 | '1) Redirect to Repository Settings->Webhooks->Add Webhook.',
8 | '2) Set your Payload URL.',
9 | '3) Set content type to \"application/x-www-form-urlencoded\".',
10 | '4) Choose events you would like to trigger in this webhook. (Recommended: Let me select individual events, and choose any events you want).',
11 | '5) Check Active checkbox. And click Add Webhook.',
12 | ],
13 | ],
14 | 'gitlab' => [
15 | 'title' => 'Adding webhook (Web Address) to GitLab repositories 🦊',
16 | 'webhookSetupSteps' => [
17 | '1) Redirect to Repository Settings->Webhooks->Add new webhook.',
18 | '2) Set your Payload URL.',
19 | '3) Choose events you would like to trigger in this webhook.',
20 | '4) Check Enable SSL verification if you are using SSL. And click Add Webhook.',
21 | ],
22 | ],
23 | 'completionMessage' => 'That it. you will receive all notifications through me 🤗',
24 | ];
25 |
--------------------------------------------------------------------------------
/lang/ja/tools/usage.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Adding webhook (Web Address) to GitHub repositories 🦑',
6 | 'webhookSetupSteps' => [
7 | '1) Redirect to Repository Settings->Webhooks->Add Webhook.',
8 | '2) Set your Payload URL.',
9 | '3) Set content type to \"application/x-www-form-urlencoded\".',
10 | '4) Choose events you would like to trigger in this webhook. (Recommended: Let me select individual events, and choose any events you want).',
11 | '5) Check Active checkbox. And click Add Webhook.',
12 | ],
13 | ],
14 | 'gitlab' => [
15 | 'title' => 'Adding webhook (Web Address) to GitLab repositories 🦊',
16 | 'webhookSetupSteps' => [
17 | '1) Redirect to Repository Settings->Webhooks->Add new webhook.',
18 | '2) Set your Payload URL.',
19 | '3) Choose events you would like to trigger in this webhook.',
20 | '4) Check Enable SSL verification if you are using SSL. And click Add Webhook.',
21 | ],
22 | ],
23 | 'completionMessage' => 'That it. you will receive all notifications through me 🤗',
24 | ];
25 |
--------------------------------------------------------------------------------
/lang/vi/tools/usage.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Adding webhook (Web Address) to GitHub repositories 🦑',
6 | 'webhookSetupSteps' => [
7 | '1) Redirect to Repository Settings->Webhooks->Add Webhook.',
8 | '2) Set your Payload URL.',
9 | '3) Set content type to \"application/x-www-form-urlencoded\".',
10 | '4) Choose events you would like to trigger in this webhook. (Recommended: Let me select individual events, and choose any events you want).',
11 | '5) Check Active checkbox. And click Add Webhook.',
12 | ],
13 | ],
14 | 'gitlab' => [
15 | 'title' => 'Adding webhook (Web Address) to GitLab repositories 🦊',
16 | 'webhookSetupSteps' => [
17 | '1) Redirect to Repository Settings->Webhooks->Add new webhook.',
18 | '2) Set your Payload URL.',
19 | '3) Choose events you would like to trigger in this webhook.',
20 | '4) Check Enable SSL verification if you are using SSL. And click Add Webhook.',
21 | ],
22 | ],
23 | 'completionMessage' => 'That it. you will receive all notifications through me 🤗',
24 | ];
25 |
--------------------------------------------------------------------------------
/resources/views/events/github/push/default.blade.php:
--------------------------------------------------------------------------------
1 | commits);
7 | $noun = ($count > 1) ? "commits" : "commit";
8 |
9 | $ref = explode('/', $payload->ref);
10 | $branch = implode('/', array_slice($ref, 2));
11 |
12 | if (empty($payload->commits)) {
13 | return '';
14 | }
15 | ?>
16 |
17 | 👷⚙️ {!! __('tg-notifier::events/github/push.default.title', [
18 | 'count' => $count,
19 | 'noun' => $noun,
20 | 'repo' => "🦑{$payload->repository->full_name}",
21 | 'branch' => $branch,
22 | ]
23 | ) !!}
24 |
25 | @foreach($payload->commits as $commit)
26 | @php
27 | $commitId = substr($commit->id, -7);
28 |
29 | $commit->message = $commit->message ?? '';
30 | $commit->message = explode("\n", $commit->message)[0];
31 | @endphp
32 | {!! __('tg-notifier::events/github/push.default.commit', [
33 | 'commit' => "$commitId",
34 | 'commit_message' => $commit->message,
35 | 'commit_by' => $commit->author->name,
36 | ]
37 | ) !!}
38 | @endforeach
39 |
40 | 🌲 {{ __('tg-notifier::app.branch') }}: {{ $branch }}
41 | 👤 {!! __('tg-notifier::events/github/push.default.pusher') !!}: {{ $payload->pusher->name }}
42 |
--------------------------------------------------------------------------------
/.php-cs-fixer.dist.php:
--------------------------------------------------------------------------------
1 | in([
5 | __DIR__ . '/src',
6 | __DIR__ . '/tests',
7 | __DIR__ . '/routes',
8 | __DIR__ . '/resources',
9 | ])
10 | ->name('*.php')
11 | ->ignoreDotFiles(true)
12 | ->ignoreVCS(true);
13 |
14 | return (new PhpCsFixer\Config())
15 | ->setRules([
16 | '@PSR12' => true,
17 | 'array_syntax' => ['syntax' => 'short'],
18 | 'ordered_imports' => ['sort_algorithm' => 'alpha'],
19 | 'no_unused_imports' => true,
20 | 'trailing_comma_in_multiline' => true,
21 | 'phpdoc_scalar' => true,
22 | 'unary_operator_spaces' => true,
23 | 'binary_operator_spaces' => true,
24 | 'blank_line_before_statement' => [
25 | 'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
26 | ],
27 | 'phpdoc_single_line_var_spacing' => true,
28 | 'phpdoc_var_without_name' => true,
29 | 'class_attributes_separation' => [
30 | 'elements' => [
31 | 'method' => 'one',
32 | ],
33 | ],
34 | 'method_argument_space' => [
35 | 'on_multiline' => 'ensure_fully_multiline',
36 | 'keep_multiple_spaces_after_comma' => true,
37 | ],
38 | 'single_trait_insert_per_statement' => true,
39 | ])
40 | ->setFinder($finder);
41 |
--------------------------------------------------------------------------------
/resources/views/events/gitlab/push/default.blade.php:
--------------------------------------------------------------------------------
1 | commits);
7 | $noun = ($count > 1) ? "commits" : "commit";
8 |
9 | $ref = explode('/', $payload->ref);
10 | $branch = implode('/', array_slice($ref, 2));
11 | $repo = "🦊{$payload->project->path_with_namespace}";
12 | ?>
13 | @if(empty($payload->commits)) {{-- New branch created --}}
14 | 🎊 {!! __('tg-notifier::events/gitlab/push.new_branch_title', [
15 | 'repo' => $repo,
16 | ]) !!}
17 | @else
18 | 👷⚙️ {!! __('tg-notifier::events/gitlab/push.title', [
19 | 'count' => $count,
20 | 'noun' => $noun,
21 | 'repo' => $repo,
22 | 'branch' => $branch,
23 | ]) !!}
24 |
25 | @foreach($payload->commits as $commit)
26 | @php
27 | $commitId = substr($commit->id, -7);
28 |
29 | $commit->message = $commit->message ?? '';
30 | $commit->message = explode("\n", $commit->message)[0];
31 | @endphp
32 | {!! __('tg-notifier::events/gitlab/push.commit', [
33 | 'commit' => "$commitId",
34 | 'commit_message' => $commit->message,
35 | 'commit_by' => $commit->author->name,
36 | ]) !!}
37 | @endforeach
38 | @endif
39 |
40 | 🌲 {{ __('tg-notifier::app.branch') }}: {{ $branch }}
41 | 👤 {!! __('tg-notifier::events/gitlab/push.pusher', ['name' => $payload->user_name]) !!}
42 |
--------------------------------------------------------------------------------
/lang/de/events/github/pull_request.php:
--------------------------------------------------------------------------------
1 | 'Reviewers: ',
5 | 'title' => 'Title',
6 | 'name' => 'Name',
7 | 'assigned' => [
8 | 'title' => 'Assigned Pull Request - :repo by :user',
9 | 'body' => ':name has been assigned in the pull request :pullRequest',
10 | ],
11 | 'closed' => [
12 | 'title' => ':title - :repo by :user',
13 | 'title_merged' => 'Pull Request Merged',
14 | 'title_closed' => 'Pull Request Closed',
15 | ],
16 | 'labeled' => [
17 | 'name' => 'Label',
18 | 'description' => 'Description',
19 | 'title' => 'Labeled Pull Request - :repo by :user',
20 | ],
21 | 'locked' => [
22 | 'title' => 'Locked Pull Request - :repo by :user',
23 | ],
24 | 'opened' => [
25 | 'title' => 'New Pull Request - :repo by :user',
26 | ],
27 | 'reopened' => [
28 | 'title' => 'Reopened Pull Request - :repo by :user',
29 | ],
30 | 'unassigned' => [
31 | 'title' => 'Unassigned Pull Request - :repo by :user',
32 | 'body' => ':name has been unassigned in the pull request :pullRequest',
33 | ],
34 | 'unlabeled' => [
35 | 'title' => 'Unlabeled Pull Request - :repo by :user',
36 | ],
37 | 'unlocked' => [
38 | 'title' => 'Unlocked Pull Request - :repo by :user',
39 | ],
40 | ];
41 |
--------------------------------------------------------------------------------
/lang/en/events/github/pull_request.php:
--------------------------------------------------------------------------------
1 | 'Reviewers: ',
5 | 'title' => 'Title',
6 | 'name' => 'Name',
7 | 'assigned' => [
8 | 'title' => 'Assigned Pull Request - :repo by :user',
9 | 'body' => ':name has been assigned in the pull request :pullRequest',
10 | ],
11 | 'closed' => [
12 | 'title' => ':title - :repo by :user',
13 | 'title_merged' => 'Pull Request Merged',
14 | 'title_closed' => 'Pull Request Closed',
15 | ],
16 | 'labeled' => [
17 | 'name' => 'Label',
18 | 'description' => 'Description',
19 | 'title' => 'Labeled Pull Request - :repo by :user',
20 | ],
21 | 'locked' => [
22 | 'title' => 'Locked Pull Request - :repo by :user',
23 | ],
24 | 'opened' => [
25 | 'title' => 'New Pull Request - :repo by :user',
26 | ],
27 | 'reopened' => [
28 | 'title' => 'Reopened Pull Request - :repo by :user',
29 | ],
30 | 'unassigned' => [
31 | 'title' => 'Unassigned Pull Request - :repo by :user',
32 | 'body' => ':name has been unassigned in the pull request :pullRequest',
33 | ],
34 | 'unlabeled' => [
35 | 'title' => 'Unlabeled Pull Request - :repo by :user',
36 | ],
37 | 'unlocked' => [
38 | 'title' => 'Unlocked Pull Request - :repo by :user',
39 | ],
40 | ];
41 |
--------------------------------------------------------------------------------
/lang/ja/events/github/pull_request.php:
--------------------------------------------------------------------------------
1 | 'Reviewers: ',
5 | 'title' => 'Title',
6 | 'name' => 'Name',
7 | 'assigned' => [
8 | 'title' => 'Assigned Pull Request - :repo by :user',
9 | 'body' => ':name has been assigned in the pull request :pullRequest',
10 | ],
11 | 'closed' => [
12 | 'title' => ':title - :repo by :user',
13 | 'title_merged' => 'Pull Request Merged',
14 | 'title_closed' => 'Pull Request Closed',
15 | ],
16 | 'labeled' => [
17 | 'name' => 'Label',
18 | 'description' => 'Description',
19 | 'title' => 'Labeled Pull Request - :repo by :user',
20 | ],
21 | 'locked' => [
22 | 'title' => 'Locked Pull Request - :repo by :user',
23 | ],
24 | 'opened' => [
25 | 'title' => 'New Pull Request - :repo by :user',
26 | ],
27 | 'reopened' => [
28 | 'title' => 'Reopened Pull Request - :repo by :user',
29 | ],
30 | 'unassigned' => [
31 | 'title' => 'Unassigned Pull Request - :repo by :user',
32 | 'body' => ':name has been unassigned in the pull request :pullRequest',
33 | ],
34 | 'unlabeled' => [
35 | 'title' => 'Unlabeled Pull Request - :repo by :user',
36 | ],
37 | 'unlocked' => [
38 | 'title' => 'Unlocked Pull Request - :repo by :user',
39 | ],
40 | ];
41 |
--------------------------------------------------------------------------------
/lang/vi/events/github/pull_request.php:
--------------------------------------------------------------------------------
1 | 'Reviewers: ',
5 | 'title' => 'Title',
6 | 'name' => 'Name',
7 | 'assigned' => [
8 | 'title' => 'Assigned Pull Request - :repo by :user',
9 | 'body' => ':name has been assigned in the pull request :pullRequest',
10 | ],
11 | 'closed' => [
12 | 'title' => ':title - :repo by :user',
13 | 'title_merged' => 'Pull Request Merged',
14 | 'title_closed' => 'Pull Request Closed',
15 | ],
16 | 'labeled' => [
17 | 'name' => 'Label',
18 | 'description' => 'Description',
19 | 'title' => 'Labeled Pull Request - :repo by :user',
20 | ],
21 | 'locked' => [
22 | 'title' => 'Locked Pull Request - :repo by :user',
23 | ],
24 | 'opened' => [
25 | 'title' => 'New Pull Request - :repo by :user',
26 | ],
27 | 'reopened' => [
28 | 'title' => 'Reopened Pull Request - :repo by :user',
29 | ],
30 | 'unassigned' => [
31 | 'title' => 'Unassigned Pull Request - :repo by :user',
32 | 'body' => ':name has been unassigned in the pull request :pullRequest',
33 | ],
34 | 'unlabeled' => [
35 | 'title' => 'Unlabeled Pull Request - :repo by :user',
36 | ],
37 | 'unlocked' => [
38 | 'title' => 'Unlocked Pull Request - :repo by :user',
39 | ],
40 | ];
41 |
--------------------------------------------------------------------------------
/lang/de/events/github/issues.php:
--------------------------------------------------------------------------------
1 | 'Name',
5 | 'closed' => [
6 | 'title' => 'Issue Closed to :issue by :user',
7 | ],
8 | 'deleted' => [
9 | 'title' => 'Issue Deleted from :issue by :user',
10 | ],
11 | 'edited' => [
12 | 'title' => 'Issue has been edited to :issue by :user',
13 | 'changes' => [
14 | 'title' => [
15 | 'name' => 'Title has been changed',
16 | 'from' => 'From: :title_from',
17 | 'to' => 'To: :title_to',
18 | ],
19 | 'body' => [
20 | 'title' => 'Body has been changed',
21 | 'message' => 'Please check the issue for more details',
22 | ],
23 | ],
24 | ],
25 | 'locked' => [
26 | 'title' => 'Issue Locked from :issue by :user',
27 | ],
28 | 'opened' => [
29 | 'title' => 'New Issue to :issue by :user',
30 | ],
31 | 'pinned' => [
32 | 'title' => 'Issue Pinned from :issue by :user',
33 | ],
34 | 'reopened' => [
35 | 'title' => 'Issue has been reopened ⚠️ to :issue by :user',
36 | ],
37 | 'unlocked' => [
38 | 'title' => 'Issue Unlocked from :issue by :user',
39 | ],
40 | 'unpinned' => [
41 | 'title' => 'Issue Unpinned from :issue by :user',
42 | ],
43 | ];
44 |
--------------------------------------------------------------------------------
/lang/en/events/github/issues.php:
--------------------------------------------------------------------------------
1 | 'Name',
5 | 'closed' => [
6 | 'title' => 'Issue Closed to :issue by :user',
7 | ],
8 | 'deleted' => [
9 | 'title' => 'Issue Deleted from :issue by :user',
10 | ],
11 | 'edited' => [
12 | 'title' => 'Issue has been edited to :issue by :user',
13 | 'changes' => [
14 | 'title' => [
15 | 'name' => 'Title has been changed',
16 | 'from' => 'From: :title_from',
17 | 'to' => 'To: :title_to',
18 | ],
19 | 'body' => [
20 | 'title' => 'Body has been changed',
21 | 'message' => 'Please check the issue for more details',
22 | ],
23 | ],
24 | ],
25 | 'locked' => [
26 | 'title' => 'Issue Locked from :issue by :user',
27 | ],
28 | 'opened' => [
29 | 'title' => 'New Issue to :issue by :user',
30 | ],
31 | 'pinned' => [
32 | 'title' => 'Issue Pinned from :issue by :user',
33 | ],
34 | 'reopened' => [
35 | 'title' => 'Issue has been reopened ⚠️ to :issue by :user',
36 | ],
37 | 'unlocked' => [
38 | 'title' => 'Issue Unlocked from :issue by :user',
39 | ],
40 | 'unpinned' => [
41 | 'title' => 'Issue Unpinned from :issue by :user',
42 | ],
43 | ];
44 |
--------------------------------------------------------------------------------
/lang/ja/events/github/issues.php:
--------------------------------------------------------------------------------
1 | 'Name',
5 | 'closed' => [
6 | 'title' => 'Issue Closed to :issue by :user',
7 | ],
8 | 'deleted' => [
9 | 'title' => 'Issue Deleted from :issue by :user',
10 | ],
11 | 'edited' => [
12 | 'title' => 'Issue has been edited to :issue by :user',
13 | 'changes' => [
14 | 'title' => [
15 | 'name' => 'Title has been changed',
16 | 'from' => 'From: :title_from',
17 | 'to' => 'To: :title_to',
18 | ],
19 | 'body' => [
20 | 'title' => 'Body has been changed',
21 | 'message' => 'Please check the issue for more details',
22 | ],
23 | ],
24 | ],
25 | 'locked' => [
26 | 'title' => 'Issue Locked from :issue by :user',
27 | ],
28 | 'opened' => [
29 | 'title' => 'New Issue to :issue by :user',
30 | ],
31 | 'pinned' => [
32 | 'title' => 'Issue Pinned from :issue by :user',
33 | ],
34 | 'reopened' => [
35 | 'title' => 'Issue has been reopened ⚠️ to :issue by :user',
36 | ],
37 | 'unlocked' => [
38 | 'title' => 'Issue Unlocked from :issue by :user',
39 | ],
40 | 'unpinned' => [
41 | 'title' => 'Issue Unpinned from :issue by :user',
42 | ],
43 | ];
44 |
--------------------------------------------------------------------------------
/lang/vi/events/github/issues.php:
--------------------------------------------------------------------------------
1 | 'Name',
5 | 'closed' => [
6 | 'title' => 'Issue Closed to :issue by :user',
7 | ],
8 | 'deleted' => [
9 | 'title' => 'Issue Deleted from :issue by :user',
10 | ],
11 | 'edited' => [
12 | 'title' => 'Issue has been edited to :issue by :user',
13 | 'changes' => [
14 | 'title' => [
15 | 'name' => 'Title has been changed',
16 | 'from' => 'From: :title_from',
17 | 'to' => 'To: :title_to',
18 | ],
19 | 'body' => [
20 | 'title' => 'Body has been changed',
21 | 'message' => 'Please check the issue for more details',
22 | ],
23 | ],
24 | ],
25 | 'locked' => [
26 | 'title' => 'Issue Locked from :issue by :user',
27 | ],
28 | 'opened' => [
29 | 'title' => 'New Issue to :issue by :user',
30 | ],
31 | 'pinned' => [
32 | 'title' => 'Issue Pinned from :issue by :user',
33 | ],
34 | 'reopened' => [
35 | 'title' => 'Issue has been reopened ⚠️ to :issue by :user',
36 | ],
37 | 'unlocked' => [
38 | 'title' => 'Issue Unlocked from :issue by :user',
39 | ],
40 | 'unpinned' => [
41 | 'title' => 'Issue Unpinned from :issue by :user',
42 | ],
43 | ];
44 |
--------------------------------------------------------------------------------
/src/Http/Actions/WebhookAction.php:
--------------------------------------------------------------------------------
1 | webhookService = new WebhookService();
15 | }
16 |
17 | /**
18 | * Set webhook for telegram bot.
19 | *
20 | * @return string
21 | *
22 | * @throws WebhookException
23 | */
24 | public function set(): string
25 | {
26 | return $this->webhookService->setWebhook();
27 | }
28 |
29 | /**
30 | * Delete webhook for telegram bot.
31 | *
32 | * @return string
33 | *
34 | * @throws WebhookException
35 | */
36 | public function delete(): string
37 | {
38 | return $this->webhookService->deleteWebHook();
39 | }
40 |
41 | /**
42 | * Get webhook update.
43 | *
44 | * @return string
45 | *
46 | * @throws WebhookException
47 | */
48 | public function getUpdates(): string
49 | {
50 | return $this->webhookService->getUpdates();
51 | }
52 |
53 | /**
54 | * Get webhook info.
55 | *
56 | * @return string
57 | *
58 | * @throws WebhookException
59 | */
60 | public function getWebHookInfo(): string
61 | {
62 | return $this->webhookService->getWebHookInfo();
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/resources/views/events/github/label/edited.blade.php:
--------------------------------------------------------------------------------
1 | changes;
8 | $label = $payload->label;
9 | $description = Str::limit($label->description);
10 | if (isset($changes->description->from)) {
11 | $description_changes = Str::limit($changes->description->from);
12 | }
13 | ?>
14 |
15 | ⚙ {!! __('tg-notifier::events/github/label.edited.title', [
16 | 'repo' => "🦑{$payload->repository->full_name}",
17 | 'user' => "@{$payload->sender->login}",
18 | ]
19 | ) !!}
20 |
21 | @if(isset($changes->name->from))
22 | 📖 {!! __('tg-notifier::events/github/label.edited.changes.title.name') !!}
23 | 📝 {!! __('tg-notifier::events/github/label.edited.changes.title.from', ['title_from' => "{$payload->changes->name->from}"]) !!}
24 | 🔖 {!! __('tg-notifier::events/github/label.edited.changes.title.to', ['title_to' => "{$payload->label->name}"]) !!}
25 | @else
26 | 🔖 {{ $label->name }}
27 | @endif
28 |
29 | @if(isset($changes->description->from))
30 | 📖 {!! __('tg-notifier::events/github/label.edited.changes.description.name') !!}
31 | 📝 {!! __('tg-notifier::events/github/label.edited.changes.description.from', ['description_from' => "{$description_changes}"]) !!}
32 | 🏷 {!! __('tg-notifier::events/github/label.edited.changes.description.to', ['description_to' => "{$description}"]) !!}
33 | @else
34 | {!! __('tg-notifier::events/shared/github._description.title') !!}: {{ $description }}
35 | @endif
36 |
--------------------------------------------------------------------------------
/src/Services/WebhookService.php:
--------------------------------------------------------------------------------
1 | webhookInterface = $webhookInterface ?? new Webhook();
16 | $this->webhookInterface->setToken(config('telegram-git-notifier.bot.token'));
17 | $this->webhookInterface->setUrl(config('telegram-git-notifier.app.url'));
18 | }
19 |
20 | /**
21 | * Set webhook for telegram bot.
22 | *
23 | * @return string
24 | *
25 | * @throws WebhookException
26 | */
27 | public function setWebhook(): string
28 | {
29 | return $this->webhookInterface->setWebhook();
30 | }
31 |
32 | /**
33 | * Delete webhook for telegram bot.
34 | *
35 | * @return string
36 | *
37 | * @throws WebhookException
38 | */
39 | public function deleteWebHook(): string
40 | {
41 | return $this->webhookInterface->deleteWebHook();
42 | }
43 |
44 | /**
45 | * Get webhook update.
46 | *
47 | * @return string
48 | *
49 | * @throws WebhookException
50 | */
51 | public function getUpdates(): string
52 | {
53 | return $this->webhookInterface->getUpdates();
54 | }
55 |
56 | /**
57 | * Get webhook info.
58 | *
59 | * @return string
60 | *
61 | * @throws WebhookException
62 | */
63 | public function getWebHookInfo(): string
64 | {
65 | return $this->webhookInterface->getWebHookInfo();
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "cslant/laravel-telegram-git-notifier",
3 | "description": "Send notification from Gitlab and GitHub events to Telegram",
4 | "keywords": [
5 | "cslant",
6 | "telegram-bot",
7 | "notify",
8 | "git-webhook",
9 | "telegram-notifier",
10 | "telegram-git-notifier",
11 | "github-notifier",
12 | "gitlab-notifier",
13 | "github-telegram-bot",
14 | "gitlab-telegram-bot",
15 | "telegram-bot-github-notify",
16 | "telegram-bot-gitlab-notify"
17 | ],
18 | "homepage": "https://github.com/cslant/laravel-telegram-git-notifier",
19 | "license": "MIT",
20 | "authors": [
21 | {
22 | "name": "Tan Nguyen",
23 | "email": "tannp@cslant.com",
24 | "homepage": "https://tanhongit.com",
25 | "role": "Developer"
26 | }
27 | ],
28 | "autoload": {
29 | "psr-4": {
30 | "CSlant\\LaravelTelegramGitNotifier\\": "src/"
31 | }
32 | },
33 | "autoload-dev": {
34 | "psr-4": {
35 | "CSlant\\LaravelTelegramGitNotifier\\Tests\\": "tests/"
36 | }
37 | },
38 | "require": {
39 | "php": "^8.1",
40 | "cslant/telegram-git-notifier": "^v1.4"
41 | },
42 | "require-dev": {
43 | "friendsofphp/php-cs-fixer": "^v3.0",
44 | "nunomaduro/collision": "^7.10",
45 | "nunomaduro/larastan": "^2.9",
46 | "orchestra/testbench": "^8.0",
47 | "pestphp/pest": "^2.0",
48 | "phpstan/extension-installer": "^1.3",
49 | "phpstan/phpstan-deprecation-rules": "^1.1",
50 | "phpstan/phpstan-phpunit": "^1.3"
51 | },
52 | "scripts": {
53 | "analyse": "vendor/bin/phpstan analyse",
54 | "format": "vendor/bin/php-cs-fixer fix --allow-risky=yes"
55 | },
56 | "support": {
57 | "issues": "https://github.com/cslant/laravel-telegram-git-notifier/issues"
58 | },
59 | "extra": {
60 | "laravel": {
61 | "providers": [
62 | "CSlant\\LaravelTelegramGitNotifier\\Providers\\TelegramGitNotifierServiceProvider"
63 | ]
64 | }
65 | },
66 | "config": {
67 | "sort-packages": true,
68 | "allow-plugins": {
69 | "pestphp/pest-plugin": true,
70 | "phpstan/extension-installer": true
71 | }
72 | },
73 | "minimum-stability": "dev",
74 | "prefer-stable": true
75 | }
76 |
--------------------------------------------------------------------------------
/src/Commands/ChangeOwnerConfigJson.php:
--------------------------------------------------------------------------------
1 | error('This command only works on Linux');
34 |
35 | return;
36 | }
37 |
38 | $user = $this->argument('user') ?: $this->getDefaultUserGroup();
39 | $group = $this->argument('group') ?: $this->getDefaultUserGroup();
40 |
41 | if (!is_string($user) || !is_string($group)) {
42 | $this->error('Failed to retrieve default user and group');
43 |
44 | return;
45 | }
46 |
47 | $this->changeOwner($user, $group);
48 | }
49 |
50 | /**
51 | * @param string $user
52 | * @param string $group
53 | * @return void
54 | */
55 | private function changeOwner(string $user, string $group): void
56 | {
57 | $jsonsPath = config('telegram-git-notifier.data_file.storage_folder');
58 | if (is_string($jsonsPath) && file_exists($jsonsPath)) {
59 | shell_exec('chown -R '.escapeshellarg($user).':'.escapeshellarg($group).' '.escapeshellarg($jsonsPath));
60 | } else {
61 | $this->error('The path to the jsons folder is not valid');
62 | }
63 | }
64 |
65 | /**
66 | * Get the default user and group for the chown command.
67 | *
68 | * @return string
69 | */
70 | private function getDefaultUserGroup(): string
71 | {
72 | $defaultUserGroup = exec('ps aux | egrep "(apache|httpd|nginx)" | grep -v "root" | head -n1 | cut -d\ -f1');
73 | if ($defaultUserGroup === false) {
74 | $this->error('Failed to retrieve default user and group');
75 |
76 | return '';
77 | }
78 |
79 | return $defaultUserGroup;
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/src/Http/Actions/IndexAction.php:
--------------------------------------------------------------------------------
1 | client = new Client();
37 |
38 | $telegram = new Telegram(config('telegram-git-notifier.bot.token'));
39 | $this->bot = new Bot($telegram);
40 | $this->notifier = new Notifier();
41 | }
42 |
43 | /**
44 | * Handle telegram git notifier app.
45 | *
46 | * @return void
47 | *
48 | * @throws InvalidViewTemplateException
49 | * @throws MessageIsEmptyException
50 | * @throws SendNotificationException
51 | * @throws BotException
52 | * @throws CallbackException
53 | * @throws EntryNotFoundException
54 | */
55 | public function __invoke(): void
56 | {
57 | if ($this->bot->isCallback()) {
58 | $callbackAction = new CallbackService($this->bot);
59 | $callbackAction->handle();
60 |
61 | return;
62 | }
63 |
64 | if ($this->bot->isMessage() && $this->bot->isOwner()) {
65 | $commandAction = new CommandService($this->bot);
66 | $commandAction->handle();
67 |
68 | return;
69 | }
70 |
71 | $sendNotification = new NotificationService(
72 | $this->notifier,
73 | $this->bot->setting
74 | );
75 | $sendNotification->handle();
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/src/Providers/TelegramGitNotifierServiceProvider.php:
--------------------------------------------------------------------------------
1 | loadRoutesFrom($routePath);
21 | }
22 |
23 | $viewPath = __DIR__.'/../../resources/views';
24 | if (file_exists($viewPath)) {
25 | $this->loadViewsFrom($viewPath, config('telegram-git-notifier.view.namespace'));
26 | }
27 |
28 | $this->loadTranslationsFrom(__DIR__.'/../../lang', 'tg-notifier');
29 |
30 | $this->registerCommands();
31 |
32 | $this->registerAssetPublishing();
33 | }
34 |
35 | /**
36 | * Register services.
37 | *
38 | * @return void
39 | */
40 | public function register(): void
41 | {
42 | $configPath = __DIR__.'/../../config/telegram-git-notifier.php';
43 | $this->mergeConfigFrom($configPath, 'telegram-git-notifier');
44 | }
45 |
46 | /**
47 | * Get the services provided by the provider.
48 | *
49 | * @return array|null
50 | */
51 | public function provides(): ?array
52 | {
53 | return ['telegram-git-notifier'];
54 | }
55 |
56 | /**
57 | * @return void
58 | */
59 | protected function registerCommands(): void
60 | {
61 | $this->commands([
62 | ChangeOwnerConfigJson::class,
63 | SetWebhook::class,
64 | ]);
65 | }
66 |
67 | /**
68 | * @return void
69 | */
70 | protected function registerAssetPublishing(): void
71 | {
72 | $configPath = __DIR__.'/../../config/telegram-git-notifier.php';
73 | $this->publishes([
74 | $configPath => config_path('telegram-git-notifier.php'),
75 | ], 'config');
76 |
77 | $this->publishes([
78 | __DIR__.'/../../resources/views' => config('telegram-git-notifier.defaults.paths.views'),
79 | ], 'views');
80 |
81 | $this->publishes([
82 | __DIR__.'/../../lang' => resource_path('lang/vendor/tg-notifier'),
83 | ], 'lang');
84 |
85 | $this->publishes([
86 | __DIR__.'/../../../telegram-git-notifier/config/jsons' => config('telegram-git-notifier.data_file.storage_folder'),
87 | ], 'config_jsons');
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/src/Services/NotificationService.php:
--------------------------------------------------------------------------------
1 |
19 | */
20 | protected array $chatIds = [];
21 |
22 | protected Notifier $notifier;
23 |
24 | protected Setting $setting;
25 |
26 | public function __construct(
27 | Notifier $notifier,
28 | Setting $setting,
29 | ) {
30 | $this->request = Request::createFromGlobals();
31 | $this->notifier = $notifier;
32 | $this->chatIds = $this->notifier->parseNotifyChatIds();
33 |
34 | $this->setting = $setting;
35 | }
36 |
37 | /**
38 | * Handle to send notification from webhook event to telegram.
39 | *
40 | * @return void
41 | *
42 | * @throws InvalidViewTemplateException
43 | * @throws SendNotificationException
44 | * @throws MessageIsEmptyException
45 | */
46 | public function handle(): void
47 | {
48 | $eventName = $this->notifier->handleEventFromRequest($this->request);
49 | if (!empty($eventName)) {
50 | $this->sendNotification($eventName);
51 | }
52 | }
53 |
54 | /**
55 | * @param string $event
56 | * @return void
57 | *
58 | * @throws InvalidViewTemplateException
59 | * @throws SendNotificationException
60 | * @throws MessageIsEmptyException
61 | */
62 | private function sendNotification(string $event): void
63 | {
64 | if (!$this->validateAccessEvent($event)) {
65 | return;
66 | }
67 |
68 | foreach ($this->chatIds as $chatId => $thread) {
69 | if (empty($chatId)) {
70 | continue;
71 | }
72 |
73 | if (empty($thread)) {
74 | $this->notifier->sendNotify(null, ['chat_id' => $chatId]);
75 |
76 | continue;
77 | }
78 |
79 | /** @var array $thread */
80 | foreach ($thread as $threadId) {
81 | $this->notifier->sendNotify(null, [
82 | 'chat_id' => $chatId, 'message_thread_id' => $threadId,
83 | ]);
84 | }
85 | }
86 | }
87 |
88 | /**
89 | * Validate access event.
90 | *
91 | * @param string $event
92 | * @return bool
93 | *
94 | * @throws InvalidViewTemplateException|MessageIsEmptyException
95 | */
96 | private function validateAccessEvent(string $event): bool
97 | {
98 | $payload = $this->notifier->setPayload($this->request, $event);
99 | $validator = new Validator($this->setting, $this->notifier->event);
100 |
101 | if (empty($payload) || !is_object($payload)
102 | || !$validator->isAccessEvent(
103 | $this->notifier->event->platform,
104 | $event,
105 | $payload
106 | )
107 | ) {
108 | return false;
109 | }
110 |
111 | return true;
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/config/telegram-git-notifier.php:
--------------------------------------------------------------------------------
1 | [
10 | 'paths' => [
11 | 'views' => env('TGN_DEFAULT_PATH_VIEW', base_path('resources/views/vendor/tg-notifier')),
12 | ],
13 |
14 | /* Set route prefix for telegram git notifier app */
15 | 'route_prefix' => $routePrefix,
16 | ],
17 |
18 | 'app' => [
19 | 'name' => env('TGN_APP_NAME', 'Laravel Telegram Git Notifier'),
20 | 'timezone' => env('TIMEZONE', 'Asia/Ho_Chi_Minh'),
21 |
22 | /* Required for the bot to work properly */
23 | 'url' => env('TGN_APP_URL', env('APP_URL', 'http://localhost')).'/'.$routePrefix,
24 | 'request_verify' => env('TGN_REQUEST_VERIFY', false),
25 | ],
26 |
27 | 'bot' => [
28 | 'token' => env('TELEGRAM_BOT_TOKEN', ''),
29 | 'chat_id' => env('TELEGRAM_BOT_CHAT_ID', ''),
30 |
31 | /**
32 | * Set the chat IDs that will receive notifications
33 | * You can add the owner bot ID, group ID, ...
34 | * -------------------------------------------------------
35 | * Note:
36 | * Please use semicolon ";" to separate chat ids
37 | * And use a colon ":" to separate chat ID and thread ID
38 | * And use comma "," if you want to add multiple thread IDs
39 | * -------------------------------------------------------
40 | * The environment variable is expected to be in the format:
41 | * "chat_id1;chat_id2:thread_id2;chat_id3:thread_id3_1,thread_id3_2;...".
42 | */
43 | 'notify_chat_ids' => env('TELEGRAM_NOTIFY_CHAT_IDS', ''),
44 | ],
45 |
46 | 'author' => [
47 | 'discussion' => env('TGN_AUTHOR_DISCUSSION', 'https://github.com/cslant/laravel-telegram-git-notifier/discussions'),
48 | 'source_code' => env('TGN_AUTHOR_SOURCE_CODE', 'https://github.com/cslant/laravel-telegram-git-notifier'),
49 | ],
50 |
51 | /* Set the path to the data file */
52 | 'data_file' => [
53 | 'storage_folder' => $configFileStorageFolder,
54 | 'setting' => env('TGN_PATH_SETTING', $configFileStorageFolder.'/tgn-settings.json'),
55 |
56 | 'platform' => [
57 | 'gitlab' => env('TGN_PATH_PLATFORM_GITLAB', $configFileStorageFolder.'/gitlab-events.json'),
58 | 'github' => env('TGN_PATH_PLATFORM_GITHUB', $configFileStorageFolder.'/github-events.json'),
59 | ],
60 | ],
61 |
62 | /* Set the path to the view file */
63 | 'view' => [
64 | 'ignore-message' => env('IGNORE_MESSAGE', 'ignore-message'),
65 | 'namespace' => env('TGN_VIEW_NAMESPACE', 'tg-notifier'),
66 | 'default' => env('TGN_VIEW_DEFAULT', base_path('resources/views/vendor/tg-notifier')),
67 | 'event' => [
68 | 'default' => env('TGN_VIEW_EVENT_DEFAULT', 'default'),
69 | ],
70 |
71 | 'globals' => [
72 | 'access_denied' => env('TGN_VIEW_GLOBALS_ACCESS_DENIED', 'globals.access_denied'),
73 | ],
74 |
75 | 'tools' => [
76 | 'settings' => env('TGN_VIEW_TOOL_SETTING', 'tools.settings'),
77 | 'custom_event_action' => env('TGN_VIEW_TOOL_CUSTOM_EVENT_ACTION', 'tools.custom_event_action'),
78 | 'custom_event' => env('TGN_VIEW_TOOL_CUSTOM_EVENT', 'tools.custom_event'),
79 | 'set_menu_cmd' => env('TGN_VIEW_TOOL_SET_MENU_COMMAND', 'tools.set_menu_cmd'),
80 | ],
81 | ],
82 | ];
83 |
--------------------------------------------------------------------------------