From 5e54bbabb360cceac98f8452aa8cfd43aefe3a03 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Wed, 22 Nov 2023 18:01:03 +0700 Subject: [PATCH 01/14] fix: update some routes for webhook --- routes/bot.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routes/bot.php b/routes/bot.php index 37c177d..81cf4a9 100644 --- a/routes/bot.php +++ b/routes/bot.php @@ -21,5 +21,7 @@ Route::prefix('webhook')->group(function () { Route::get('/set', [WebhookAction::class, 'set'])->name('telegram-git-notifier.webhook.set'); Route::get('/delete', [WebhookAction::class, 'delete'])->name('telegram-git-notifier.webhook.delete'); + Route::get('/info', [WebhookAction::class, 'getWebHookInfo'])->name('telegram-git-notifier.webhook.info'); + Route::get('/updates', [WebhookAction::class, 'getUpdates'])->name('telegram-git-notifier.webhook.updates'); }); }); From a1b33f50072e1da7ec0fae62bc3a3f63cbb61f01 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Thu, 23 Nov 2023 01:11:23 +0700 Subject: [PATCH 02/14] fix: update some view template for event - push event on github - feature flat event on gitlab --- lang/de/events/github/push.php | 2 +- lang/en/events/github/push.php | 2 +- lang/en/events/gitlab/feature_flag.php | 9 ++++++++ lang/en/events/shared/gitlab.php | 10 ++++++++ lang/ja/events/github/push.php | 2 +- lang/vi/events/github/push.php | 2 +- .../events/github/push/default.blade.php | 2 +- .../gitlab/feature_flag/default.blade.php | 23 +++++++++++-------- .../shared/partials/gitlab/_body.blade.php | 10 +++++--- 9 files changed, 45 insertions(+), 17 deletions(-) create mode 100644 lang/en/events/gitlab/feature_flag.php create mode 100644 lang/en/events/shared/gitlab.php diff --git a/lang/de/events/github/push.php b/lang/de/events/github/push.php index cf34b67..9d65e90 100644 --- a/lang/de/events/github/push.php +++ b/lang/de/events/github/push.php @@ -3,7 +3,7 @@ return [ 'default' => [ 'title' => 'šŸ‘·āš™ļø :count new :noun to šŸ¦‘:user::branch', - 'commit' => ':commit: :commit_message - by :commit_name', + 'commit' => ':commit: :commit_message - by :commit_by', 'pushed' => 'šŸ‘¤ Pushed by : :name', ], ]; diff --git a/lang/en/events/github/push.php b/lang/en/events/github/push.php index cf34b67..14143f9 100644 --- a/lang/en/events/github/push.php +++ b/lang/en/events/github/push.php @@ -3,7 +3,7 @@ return [ 'default' => [ 'title' => 'šŸ‘·āš™ļø :count new :noun to šŸ¦‘:user::branch', - 'commit' => ':commit: :commit_message - by :commit_name', + 'commit' => '[:commit] :commit_message - by :commit_by', 'pushed' => 'šŸ‘¤ Pushed by : :name', ], ]; diff --git a/lang/en/events/gitlab/feature_flag.php b/lang/en/events/gitlab/feature_flag.php new file mode 100644 index 0000000..4380727 --- /dev/null +++ b/lang/en/events/gitlab/feature_flag.php @@ -0,0 +1,9 @@ + [ + 'enabled' => 'Feature Flag Enabled šŸ¦Š:flag_tag by :user_tag', + 'disabled' => 'Feature Flag Disabled šŸ¦Š:flag_tag by :user_tag', + ], + 'name' => 'Name: :flag_name', +]; diff --git a/lang/en/events/shared/gitlab.php b/lang/en/events/shared/gitlab.php new file mode 100644 index 0000000..ce3f29f --- /dev/null +++ b/lang/en/events/shared/gitlab.php @@ -0,0 +1,10 @@ + [ + 'title' => 'šŸ“– Content:', + ], + '_assignee' => [ + 'title' => 'šŸ™‹ Assignee: ', + ], +]; diff --git a/lang/ja/events/github/push.php b/lang/ja/events/github/push.php index cf34b67..9d65e90 100644 --- a/lang/ja/events/github/push.php +++ b/lang/ja/events/github/push.php @@ -3,7 +3,7 @@ return [ 'default' => [ 'title' => 'šŸ‘·āš™ļø :count new :noun to šŸ¦‘:user::branch', - 'commit' => ':commit: :commit_message - by :commit_name', + 'commit' => ':commit: :commit_message - by :commit_by', 'pushed' => 'šŸ‘¤ Pushed by : :name', ], ]; diff --git a/lang/vi/events/github/push.php b/lang/vi/events/github/push.php index cf34b67..9d65e90 100644 --- a/lang/vi/events/github/push.php +++ b/lang/vi/events/github/push.php @@ -3,7 +3,7 @@ return [ 'default' => [ 'title' => 'šŸ‘·āš™ļø :count new :noun to šŸ¦‘:user::branch', - 'commit' => ':commit: :commit_message - by :commit_name', + 'commit' => ':commit: :commit_message - by :commit_by', 'pushed' => 'šŸ‘¤ Pushed by : :name', ], ]; diff --git a/resources/views/events/github/push/default.blade.php b/resources/views/events/github/push/default.blade.php index e3c66dd..d64f2c5 100644 --- a/resources/views/events/github/push/default.blade.php +++ b/resources/views/events/github/push/default.blade.php @@ -25,7 +25,7 @@ {!! __('tg-notifier::events/github/push.default.commit', [ 'commit' => "$commitId", 'commit_message' => $commit->message, - 'commit_name' => $commit->author->name, + 'commit_by' => $commit->author->name, ] ) !!} @endforeach diff --git a/resources/views/events/gitlab/feature_flag/default.blade.php b/resources/views/events/gitlab/feature_flag/default.blade.php index 1229495..7c1a21b 100644 --- a/resources/views/events/gitlab/feature_flag/default.blade.php +++ b/resources/views/events/gitlab/feature_flag/default.blade.php @@ -1,22 +1,27 @@ project->web_url."/-/feature_flags/".$payload->object_attributes->id; +$flatTag = "{$payload->project->path_with_namespace}#{$payload->object_attributes->name}"; +$userTag = "user_url}\">{$payload->user->name}"; + if ($payload->object_attributes->active) { - $active = "Enabled"; + $active = "enabled"; $icon = "šŸš©"; } else { - $active = "Disabled"; + $active = "disabled"; $icon = "šŸ“"; } +?> -$flagUrl = $payload->project->web_url . "/-/feature_flags/" . $payload->object_attributes->id; - -$message = "{$icon} Feature Flag {$active} - šŸ¦Š{$payload->project->path_with_namespace}#{$payload->object_attributes->name} by user_url}\">{$payload->user->name}\n\n"; - -$message .= "{$icon} Name: {$payload->object_attributes->name} \n\n"; +{!! $icon !!} {!! __('tg-notifier::events/gitlab/feature_flag.title'.$active, [ + 'flag_tag' => $flagTag, + 'user_tag' => $userTag, + ]) !!} -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; +{!! $icon !!} {!! __('tg-notifier::events/gitlab/feature_flag.name', ['flag_name' => $payload->object_attributes->name]) !!} -echo $message; +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/shared/partials/gitlab/_body.blade.php b/resources/views/events/shared/partials/gitlab/_body.blade.php index fb505db..8f0d84b 100644 --- a/resources/views/events/shared/partials/gitlab/_body.blade.php +++ b/resources/views/events/shared/partials/gitlab/_body.blade.php @@ -1,8 +1,10 @@ object_attributes->description)) { $body = $payload->object_attributes->description; @@ -21,7 +23,9 @@ $body = substr($body, 0, 50) . '...'; } - return "šŸ“– Content:\n{$body}"; + $html = __('tg-notifier::events/shared/gitlab._body.title', ['body' => $body]) + ."\n" + .htmlentities($body); } - -return ''; +?> +{!! $html !!} From e8820b3593b075504c6570145a515654245481c3 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Thu, 23 Nov 2023 01:14:21 +0700 Subject: [PATCH 03/14] fix: update some view template for github events --- resources/views/events/github/push/default.blade.php | 6 +++--- .../views/events/github/workflow_run/completed.blade.php | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/resources/views/events/github/push/default.blade.php b/resources/views/events/github/push/default.blade.php index d64f2c5..dcc7e56 100644 --- a/resources/views/events/github/push/default.blade.php +++ b/resources/views/events/github/push/default.blade.php @@ -19,9 +19,9 @@ ) !!} @foreach($payload->commits as $commit) - @php - $commitId = substr($commit->id, -7); - @endphp +@php + $commitId = substr($commit->id, -7); +@endphp {!! __('tg-notifier::events/github/push.default.commit', [ 'commit' => "$commitId", 'commit_message' => $commit->message, diff --git a/resources/views/events/github/workflow_run/completed.blade.php b/resources/views/events/github/workflow_run/completed.blade.php index 7da1975..a1805be 100644 --- a/resources/views/events/github/workflow_run/completed.blade.php +++ b/resources/views/events/github/workflow_run/completed.blade.php @@ -9,25 +9,21 @@ {!! __('tg-notifier::events/github/workflow_run.completed.success.title', ['user' => "{$payload->repository->full_name}"]) !!} {!! __('tg-notifier::events/github/workflow_run.completed.success.body', ['name' => $payload->workflow_run->name]) !!} - @break @case('failure') {!! __('tg-notifier::events/github/workflow_run.completed.failure.title', ['user' => "{$payload->repository->full_name}"]) !!} {!! __('tg-notifier::events/github/workflow_run.completed.failure.body', ['name' => $payload->workflow_run->name]) !!} - @break @case('cancelled') {!! __('tg-notifier::events/github/workflow_run.completed.cancelled.title', ['user' => "{$payload->repository->full_name}"]) !!} {!! __('tg-notifier::events/github/workflow_run.completed.cancelled.body', ['name' => $payload->workflow_run->name]) !!} - @break @default {!! __('tg-notifier::events/github/workflow_run.completed.default.title', ['user' => "{$payload->repository->full_name}"]) !!} {!! __('tg-notifier::events/github/workflow_run.completed.default.body', ['name' => $payload->workflow_run->name]) !!} - @break @endswitch From 439f6a9093178734b515547b75242a88d377d9c0 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Thu, 23 Nov 2023 01:18:52 +0700 Subject: [PATCH 04/14] fix: update docblock and partials for gitlab events --- .../events/github/issue_comment/created.blade.php | 2 +- .../events/github/issue_comment/deleted.blade.php | 2 +- .../views/events/github/issue_comment/edited.blade.php | 2 +- resources/views/events/github/issues/closed.blade.php | 2 +- resources/views/events/github/issues/deleted.blade.php | 2 +- resources/views/events/github/issues/edited.blade.php | 2 +- resources/views/events/github/issues/locked.blade.php | 2 +- resources/views/events/github/issues/opened.blade.php | 2 +- resources/views/events/github/issues/pinned.blade.php | 2 +- .../views/events/github/issues/reopened.blade.php | 2 +- .../views/events/github/issues/unlocked.blade.php | 2 +- .../views/events/github/issues/unpinned.blade.php | 2 +- resources/views/events/github/ping/default.blade.php | 2 +- .../views/events/github/pull_request/closed.blade.php | 2 +- .../views/events/github/pull_request/opened.blade.php | 2 +- .../github/pull_request/partials/_reviewers.blade.php | 2 +- .../events/github/pull_request/reopened.blade.php | 2 +- .../github/pull_request_review/dismissed.blade.php | 2 +- .../github/pull_request_review/submitted.blade.php | 2 +- resources/views/events/github/push/default.blade.php | 2 +- resources/views/events/github/watch/started.blade.php | 2 +- .../events/github/workflow_job/completed.blade.php | 2 +- .../events/github/workflow_job/in_progress.blade.php | 2 +- .../views/events/github/workflow_job/queued.blade.php | 2 +- .../events/github/workflow_run/completed.blade.php | 2 +- .../events/github/workflow_run/requested.blade.php | 2 +- .../views/events/gitlab/feature_flag/default.blade.php | 2 +- resources/views/events/gitlab/issue/close.blade.php | 2 +- resources/views/events/gitlab/issue/open.blade.php | 2 +- resources/views/events/gitlab/issue/reopen.blade.php | 2 +- resources/views/events/gitlab/issue/update.blade.php | 2 +- .../events/gitlab/merge_request/approved.blade.php | 2 +- .../views/events/gitlab/merge_request/close.blade.php | 2 +- .../views/events/gitlab/merge_request/merge.blade.php | 2 +- .../views/events/gitlab/merge_request/open.blade.php | 2 +- .../gitlab/merge_request/partials/_reviewers.blade.php | 2 +- .../views/events/gitlab/merge_request/reopen.blade.php | 2 +- .../events/gitlab/merge_request/unapproval.blade.php | 2 +- .../events/gitlab/merge_request/unapproved.blade.php | 2 +- .../views/events/gitlab/merge_request/update.blade.php | 2 +- resources/views/events/gitlab/note/commit.blade.php | 2 +- resources/views/events/gitlab/note/issue.blade.php | 2 +- .../views/events/gitlab/note/merge_request.blade.php | 2 +- resources/views/events/gitlab/note/snippet.blade.php | 2 +- resources/views/events/gitlab/push/default.blade.php | 2 +- resources/views/events/gitlab/release/create.blade.php | 2 +- resources/views/events/gitlab/release/update.blade.php | 2 +- .../views/events/gitlab/tag_push/default.blade.php | 2 +- .../views/events/gitlab/wiki_page/create.blade.php | 2 +- .../views/events/gitlab/wiki_page/delete.blade.php | 2 +- .../views/events/gitlab/wiki_page/update.blade.php | 2 +- .../events/shared/partials/github/_assignees.blade.php | 2 +- .../events/shared/partials/github/_body.blade.php | 2 +- .../events/shared/partials/gitlab/_assignees.blade.php | 10 +++++----- .../events/shared/partials/gitlab/_body.blade.php | 2 +- 55 files changed, 59 insertions(+), 59 deletions(-) diff --git a/resources/views/events/github/issue_comment/created.blade.php b/resources/views/events/github/issue_comment/created.blade.php index 3e43030..f030b37 100644 --- a/resources/views/events/github/issue_comment/created.blade.php +++ b/resources/views/events/github/issue_comment/created.blade.php @@ -1,6 +1,6 @@ diff --git a/resources/views/events/github/pull_request/closed.blade.php b/resources/views/events/github/pull_request/closed.blade.php index 61df4b7..b806786 100644 --- a/resources/views/events/github/pull_request/closed.blade.php +++ b/resources/views/events/github/pull_request/closed.blade.php @@ -1,6 +1,6 @@ pull_request; diff --git a/resources/views/events/github/pull_request_review/submitted.blade.php b/resources/views/events/github/pull_request_review/submitted.blade.php index cb7c82e..bd04fb6 100644 --- a/resources/views/events/github/pull_request_review/submitted.blade.php +++ b/resources/views/events/github/pull_request_review/submitted.blade.php @@ -1,6 +1,6 @@ pull_request; diff --git a/resources/views/events/github/push/default.blade.php b/resources/views/events/github/push/default.blade.php index dcc7e56..ffc23bb 100644 --- a/resources/views/events/github/push/default.blade.php +++ b/resources/views/events/github/push/default.blade.php @@ -1,6 +1,6 @@ commits); diff --git a/resources/views/events/github/watch/started.blade.php b/resources/views/events/github/watch/started.blade.php index f0a8f02..af603be 100644 --- a/resources/views/events/github/watch/started.blade.php +++ b/resources/views/events/github/watch/started.blade.php @@ -1,6 +1,6 @@ diff --git a/resources/views/events/github/workflow_job/completed.blade.php b/resources/views/events/github/workflow_job/completed.blade.php index 99a183d..17aebad 100644 --- a/resources/views/events/github/workflow_job/completed.blade.php +++ b/resources/views/events/github/workflow_job/completed.blade.php @@ -1,6 +1,6 @@ diff --git a/resources/views/events/github/workflow_job/in_progress.blade.php b/resources/views/events/github/workflow_job/in_progress.blade.php index 53a953e..8b4f626 100644 --- a/resources/views/events/github/workflow_job/in_progress.blade.php +++ b/resources/views/events/github/workflow_job/in_progress.blade.php @@ -1,6 +1,6 @@ diff --git a/resources/views/events/github/workflow_job/queued.blade.php b/resources/views/events/github/workflow_job/queued.blade.php index cc22c08..24c0a95 100644 --- a/resources/views/events/github/workflow_job/queued.blade.php +++ b/resources/views/events/github/workflow_job/queued.blade.php @@ -1,6 +1,6 @@ diff --git a/resources/views/events/github/workflow_run/completed.blade.php b/resources/views/events/github/workflow_run/completed.blade.php index a1805be..2b564e1 100644 --- a/resources/views/events/github/workflow_run/completed.blade.php +++ b/resources/views/events/github/workflow_run/completed.blade.php @@ -1,6 +1,6 @@ diff --git a/resources/views/events/github/workflow_run/requested.blade.php b/resources/views/events/github/workflow_run/requested.blade.php index 1db14fc..75b4778 100644 --- a/resources/views/events/github/workflow_run/requested.blade.php +++ b/resources/views/events/github/workflow_run/requested.blade.php @@ -1,6 +1,6 @@ diff --git a/resources/views/events/gitlab/feature_flag/default.blade.php b/resources/views/events/gitlab/feature_flag/default.blade.php index 7c1a21b..4014d6a 100644 --- a/resources/views/events/gitlab/feature_flag/default.blade.php +++ b/resources/views/events/gitlab/feature_flag/default.blade.php @@ -1,6 +1,6 @@ Issue Closed to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->id} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/issue/open.blade.php b/resources/views/events/gitlab/issue/open.blade.php index 5ee93a3..9f65d04 100644 --- a/resources/views/events/gitlab/issue/open.blade.php +++ b/resources/views/events/gitlab/issue/open.blade.php @@ -1,6 +1,6 @@ New Issue to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->id} created by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/issue/reopen.blade.php b/resources/views/events/gitlab/issue/reopen.blade.php index 231fc7a..41426ef 100644 --- a/resources/views/events/gitlab/issue/reopen.blade.php +++ b/resources/views/events/gitlab/issue/reopen.blade.php @@ -1,6 +1,6 @@ Issue has been reopened āš ļø to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->id} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/issue/update.blade.php b/resources/views/events/gitlab/issue/update.blade.php index eb23e72..e79ba8c 100644 --- a/resources/views/events/gitlab/issue/update.blade.php +++ b/resources/views/events/gitlab/issue/update.blade.php @@ -1,6 +1,6 @@ Issue has been edited to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->id} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/merge_request/approved.blade.php b/resources/views/events/gitlab/merge_request/approved.blade.php index 401556b..4fcaffe 100644 --- a/resources/views/events/gitlab/merge_request/approved.blade.php +++ b/resources/views/events/gitlab/merge_request/approved.blade.php @@ -1,6 +1,6 @@ Merge Request Approved to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/merge_request/close.blade.php b/resources/views/events/gitlab/merge_request/close.blade.php index 612677f..67d9cce 100644 --- a/resources/views/events/gitlab/merge_request/close.blade.php +++ b/resources/views/events/gitlab/merge_request/close.blade.php @@ -1,6 +1,6 @@ Close Merge Request - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/merge_request/merge.blade.php b/resources/views/events/gitlab/merge_request/merge.blade.php index d653cb9..90f4c56 100644 --- a/resources/views/events/gitlab/merge_request/merge.blade.php +++ b/resources/views/events/gitlab/merge_request/merge.blade.php @@ -1,6 +1,6 @@ Merge Request Merged to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/merge_request/open.blade.php b/resources/views/events/gitlab/merge_request/open.blade.php index d5a6efd..d96110e 100644 --- a/resources/views/events/gitlab/merge_request/open.blade.php +++ b/resources/views/events/gitlab/merge_request/open.blade.php @@ -1,6 +1,6 @@ Merge Request Opened to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/merge_request/partials/_reviewers.blade.php b/resources/views/events/gitlab/merge_request/partials/_reviewers.blade.php index 0dfbfa8..b8ed8ca 100644 --- a/resources/views/events/gitlab/merge_request/partials/_reviewers.blade.php +++ b/resources/views/events/gitlab/merge_request/partials/_reviewers.blade.php @@ -1,6 +1,6 @@ Merge Request Reopened to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/merge_request/unapproval.blade.php b/resources/views/events/gitlab/merge_request/unapproval.blade.php index e7e3554..997203b 100644 --- a/resources/views/events/gitlab/merge_request/unapproval.blade.php +++ b/resources/views/events/gitlab/merge_request/unapproval.blade.php @@ -1,6 +1,6 @@ Merge Request Unapproved to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/merge_request/unapproved.blade.php b/resources/views/events/gitlab/merge_request/unapproved.blade.php index 612677f..67d9cce 100644 --- a/resources/views/events/gitlab/merge_request/unapproved.blade.php +++ b/resources/views/events/gitlab/merge_request/unapproved.blade.php @@ -1,6 +1,6 @@ Close Merge Request - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/merge_request/update.blade.php b/resources/views/events/gitlab/merge_request/update.blade.php index 8a8dac3..dd0a4df 100644 --- a/resources/views/events/gitlab/merge_request/update.blade.php +++ b/resources/views/events/gitlab/merge_request/update.blade.php @@ -1,6 +1,6 @@ Merge Request Updated to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/note/commit.blade.php b/resources/views/events/gitlab/note/commit.blade.php index bb24184..0a084a4 100644 --- a/resources/views/events/gitlab/note/commit.blade.php +++ b/resources/views/events/gitlab/note/commit.blade.php @@ -1,6 +1,6 @@ New Comment on Commit - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/note/issue.blade.php b/resources/views/events/gitlab/note/issue.blade.php index 8009523..309ecbf 100644 --- a/resources/views/events/gitlab/note/issue.blade.php +++ b/resources/views/events/gitlab/note/issue.blade.php @@ -1,6 +1,6 @@ New Comment on Issue - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->issue->iid} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/note/merge_request.blade.php b/resources/views/events/gitlab/note/merge_request.blade.php index 149e932..9c332d9 100644 --- a/resources/views/events/gitlab/note/merge_request.blade.php +++ b/resources/views/events/gitlab/note/merge_request.blade.php @@ -1,6 +1,6 @@ New Comment on Merge Request - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->merge_request->iid} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/note/snippet.blade.php b/resources/views/events/gitlab/note/snippet.blade.php index 783c37e..a3fe97c 100644 --- a/resources/views/events/gitlab/note/snippet.blade.php +++ b/resources/views/events/gitlab/note/snippet.blade.php @@ -1,6 +1,6 @@ New Comment on Snippet - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/push/default.blade.php b/resources/views/events/gitlab/push/default.blade.php index 6bde206..9ccd49d 100644 --- a/resources/views/events/gitlab/push/default.blade.php +++ b/resources/views/events/gitlab/push/default.blade.php @@ -1,6 +1,6 @@ commits); diff --git a/resources/views/events/gitlab/release/create.blade.php b/resources/views/events/gitlab/release/create.blade.php index f0fe6d7..b53d922 100644 --- a/resources/views/events/gitlab/release/create.blade.php +++ b/resources/views/events/gitlab/release/create.blade.php @@ -1,6 +1,6 @@ Release Created - šŸ¦Šurl}\">{$payload->project->path_with_namespace}#{$payload->tag} by {$payload->commit->author->name}\n\n"; diff --git a/resources/views/events/gitlab/release/update.blade.php b/resources/views/events/gitlab/release/update.blade.php index 092ddbb..e792f24 100644 --- a/resources/views/events/gitlab/release/update.blade.php +++ b/resources/views/events/gitlab/release/update.blade.php @@ -1,6 +1,6 @@ Release Updated - šŸ¦Šurl}\">{$payload->project->path_with_namespace}#{$payload->tag} by {$payload->commit->author->name}\n\n"; diff --git a/resources/views/events/gitlab/tag_push/default.blade.php b/resources/views/events/gitlab/tag_push/default.blade.php index 30a1b6e..88295f2 100644 --- a/resources/views/events/gitlab/tag_push/default.blade.php +++ b/resources/views/events/gitlab/tag_push/default.blade.php @@ -1,6 +1,6 @@ ref); diff --git a/resources/views/events/gitlab/wiki_page/create.blade.php b/resources/views/events/gitlab/wiki_page/create.blade.php index 761741a..a75828d 100644 --- a/resources/views/events/gitlab/wiki_page/create.blade.php +++ b/resources/views/events/gitlab/wiki_page/create.blade.php @@ -1,6 +1,6 @@ Wiki Page Created - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->slug} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/wiki_page/delete.blade.php b/resources/views/events/gitlab/wiki_page/delete.blade.php index 3943a12..d2e93c4 100644 --- a/resources/views/events/gitlab/wiki_page/delete.blade.php +++ b/resources/views/events/gitlab/wiki_page/delete.blade.php @@ -1,6 +1,6 @@ Wiki Page Deleted - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->slug} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/gitlab/wiki_page/update.blade.php b/resources/views/events/gitlab/wiki_page/update.blade.php index a163760..d564036 100644 --- a/resources/views/events/gitlab/wiki_page/update.blade.php +++ b/resources/views/events/gitlab/wiki_page/update.blade.php @@ -1,6 +1,6 @@ Wiki Page Updated - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->slug} by {$payload->user->name}\n\n"; diff --git a/resources/views/events/shared/partials/github/_assignees.blade.php b/resources/views/events/shared/partials/github/_assignees.blade.php index 36e428e..85fb070 100644 --- a/resources/views/events/shared/partials/github/_assignees.blade.php +++ b/resources/views/events/shared/partials/github/_assignees.blade.php @@ -1,6 +1,6 @@ assignees)) { - $assigneeText = "šŸ™‹ Assignee: "; + $assigneeText = __('tg-notifier::events/shared/gitlab._assignee.title'); $assigneeArray = []; foreach ($payload->assignees as $assignee) { $assigneeArray[] = "{$assignee->name}"; } - $assigneeText .= implode(', ', $assigneeArray) . "\n"; + $assigneeText .= implode(', ', $assigneeArray); } - -return $assigneeText ?? ''; +?> +{!! $assigneeText ?? '' !!} diff --git a/resources/views/events/shared/partials/gitlab/_body.blade.php b/resources/views/events/shared/partials/gitlab/_body.blade.php index 8f0d84b..fc029b3 100644 --- a/resources/views/events/shared/partials/gitlab/_body.blade.php +++ b/resources/views/events/shared/partials/gitlab/_body.blade.php @@ -1,6 +1,6 @@ Date: Thu, 23 Nov 2023 08:58:56 +0700 Subject: [PATCH 05/14] fix: update view actions for issue gitlab event --- lang/en/events/github/workflow_run.php | 2 +- lang/en/events/gitlab/issues.php | 28 +++++++++++++++++++ .../views/events/gitlab/issue/close.blade.php | 17 ++++++----- .../views/events/gitlab/issue/open.blade.php | 17 ++++++----- .../events/gitlab/issue/reopen.blade.php | 17 ++++++----- 5 files changed, 59 insertions(+), 22 deletions(-) create mode 100644 lang/en/events/gitlab/issues.php diff --git a/lang/en/events/github/workflow_run.php b/lang/en/events/github/workflow_run.php index 4e895d4..f6cff4d 100644 --- a/lang/en/events/github/workflow_run.php +++ b/lang/en/events/github/workflow_run.php @@ -23,5 +23,5 @@ 'title' => ' Workflow Requested form šŸ¦‘:user', 'body' => 'Running workflow: šŸ’„ :name ā³', ], - 'link' => 'šŸ”— Link: :link', + 'link' => 'šŸ”— Workflow run link: :link', ]; diff --git a/lang/en/events/gitlab/issues.php b/lang/en/events/gitlab/issues.php new file mode 100644 index 0000000..a8959f2 --- /dev/null +++ b/lang/en/events/gitlab/issues.php @@ -0,0 +1,28 @@ + 'šŸ“¢', + 'closed' => [ + 'title' => 'šŸš« Issue Closed to šŸ¦Š :issue by :user', + ], + 'edited' => [ + 'title' => 'āš ļø Issue has been edited to šŸ¦Š :issue by :user', + 'changes' => [ + 'title' => [ + 'name' => 'šŸ“– Title has been changed', + 'from' => 'šŸ“ From: :title_from', + 'to' => 'šŸ· To: :title_to', + ], + 'body' => [ + 'title' => 'šŸ“– Body has been changed', + 'message' => 'Please check the issue for more details', + ], + ], + ], + 'opened' => [ + 'title' => 'āš ļø New Issue to šŸ¦Š :issue by :user', + ], + 'reopened' => [ + 'title' => 'āš ļø Issue has been reopened āš ļø to šŸ¦Š :issue by :user', + ], +]; diff --git a/resources/views/events/gitlab/issue/close.blade.php b/resources/views/events/gitlab/issue/close.blade.php index 4053b14..0dd844a 100644 --- a/resources/views/events/gitlab/issue/close.blade.php +++ b/resources/views/events/gitlab/issue/close.blade.php @@ -1,14 +1,17 @@ Issue Closed to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->id} by {$payload->user->name}\n\n"; +?> +{!! __('tg-notifier::events/gitlab/issues.closed.title', [ + 'issue' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->id}", + 'user' => "{$payload->user->name}" + ] + ) !!} -$message .= "šŸ“¢ {$payload->object_attributes->title}\n"; +šŸ“¢ {{ $payload->object_attributes->title }} -$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/issue/open.blade.php b/resources/views/events/gitlab/issue/open.blade.php index 9f65d04..a1a1220 100644 --- a/resources/views/events/gitlab/issue/open.blade.php +++ b/resources/views/events/gitlab/issue/open.blade.php @@ -1,14 +1,17 @@ New Issue to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->id} created by {$payload->user->name}\n\n"; +?> +{!! __('tg-notifier::events/gitlab/issues.opened.title', [ + 'issue' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->id}", + 'user' => "{$payload->user->name}" + ] + ) !!} -$message .= "šŸ“¢ {$payload->object_attributes->title}\n"; +šŸ“¢ {{ $payload->object_attributes->title }} -$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/issue/reopen.blade.php b/resources/views/events/gitlab/issue/reopen.blade.php index 41426ef..67c2646 100644 --- a/resources/views/events/gitlab/issue/reopen.blade.php +++ b/resources/views/events/gitlab/issue/reopen.blade.php @@ -1,14 +1,17 @@ Issue has been reopened āš ļø to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->id} by {$payload->user->name}\n\n"; +?> +{!! __('tg-notifier::events/gitlab/issues.reopened.title', [ + 'issue' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->id}", + 'user' => "{$payload->user->name}" + ] + ) !!} -$message .= "šŸ“¢ {$payload->object_attributes->title}\n"; +šŸ“¢ {{ $payload->object_attributes->title }} -$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) From 25954a9d3908ec6b94179d9f83ec148516b4ee11 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Thu, 23 Nov 2023 09:16:15 +0700 Subject: [PATCH 06/14] fix: update view template for push events --- lang/en/events/github/push.php | 4 +-- lang/en/events/gitlab/push.php | 9 +++++++ .../events/github/push/default.blade.php | 4 +-- .../events/gitlab/push/default.blade.php | 26 ++++++++++++++----- 4 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 lang/en/events/gitlab/push.php diff --git a/lang/en/events/github/push.php b/lang/en/events/github/push.php index 14143f9..e37a931 100644 --- a/lang/en/events/github/push.php +++ b/lang/en/events/github/push.php @@ -2,8 +2,8 @@ return [ 'default' => [ - 'title' => 'šŸ‘·āš™ļø :count new :noun to šŸ¦‘:user::branch', + 'title' => 'šŸ‘·āš™ļø :count new :noun to šŸ¦Š:repo::branch', 'commit' => '[:commit] :commit_message - by :commit_by', - 'pushed' => 'šŸ‘¤ Pushed by : :name', + 'pusher' => 'šŸ‘¤ Pushed by : :name', ], ]; diff --git a/lang/en/events/gitlab/push.php b/lang/en/events/gitlab/push.php new file mode 100644 index 0000000..3c6cba5 --- /dev/null +++ b/lang/en/events/gitlab/push.php @@ -0,0 +1,9 @@ + [ + 'title' => 'šŸ‘·āš™ļø :count new :noun to šŸ¦‘:repo::branch', + 'commit' => '[:commit] :commit_message - by :commit_by', + 'pusher' => 'šŸ‘¤ Pushed by : :name', + ], +]; diff --git a/resources/views/events/github/push/default.blade.php b/resources/views/events/github/push/default.blade.php index ffc23bb..b1c2248 100644 --- a/resources/views/events/github/push/default.blade.php +++ b/resources/views/events/github/push/default.blade.php @@ -13,7 +13,7 @@ {!! __('tg-notifier::events/github/push.default.title', [ 'count' => $count, 'noun' => $noun, - 'user' => $payload->repository->full_name, + 'repo' => $payload->repository->full_name, 'branch' => $branch, ] ) !!} @@ -30,4 +30,4 @@ ) !!} @endforeach -{!! __('tg-notifier::events/github/push.default.pushed', ['name' => $payload->pusher->name]) !!} +{!! __('tg-notifier::events/github/push.default.pusher', ['name' => $payload->pusher->name]) !!} diff --git a/resources/views/events/gitlab/push/default.blade.php b/resources/views/events/gitlab/push/default.blade.php index 9ccd49d..c552690 100644 --- a/resources/views/events/gitlab/push/default.blade.php +++ b/resources/views/events/gitlab/push/default.blade.php @@ -8,14 +8,26 @@ $ref = explode('/', $payload->ref); $branch = implode('/', array_slice($ref, 2)); +?> -$message = "āš™ļø {$count} new {$noun} to šŸ¦Š{$payload->project->path_with_namespace}:{$branch}\n\n"; +{!! __('tg-notifier::events/gitlab/push.default.title', [ + 'count' => $count, + 'noun' => $noun, + 'repo' => $payload->project->path_with_namespace, + 'branch' => $branch, + ] + ) !!} -foreach ($payload->commits as $commit) { +@foreach($payload->commits as $commit) +@php $commitId = substr($commit->id, -7); - $message .= "url}\">{$commitId}: {$commit->message} - by {$commit->author->name}\n"; -} +@endphp +{!! __('tg-notifier::events/gitlab/push.default.commit', [ + 'commit' => "$commitId", + 'commit_message' => $commit->message, + 'commit_by' => $commit->author->name, + ] +) !!} +@endforeach -$message .= "\nšŸ‘¤ Pushed by : {$payload->user_name}\n"; - -echo $message; +{!! __('tg-notifier::events/gitlab/push.default.pusher', ['name' => $payload->user_name]) !!} From b971be0f6ed395b4139b5cfb6f7077483885c5e3 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Thu, 23 Nov 2023 09:29:27 +0700 Subject: [PATCH 07/14] fix: update view template for release gitlab events --- lang/en/events/gitlab/issues.php | 14 -------------- lang/en/events/gitlab/release.php | 9 +++++++++ .../events/gitlab/release/create.blade.php | 16 ++++++++++------ .../events/gitlab/release/delete.blade.php | 18 ++++++++++++++++++ .../events/gitlab/release/update.blade.php | 16 ++++++++++------ 5 files changed, 47 insertions(+), 26 deletions(-) create mode 100644 lang/en/events/gitlab/release.php create mode 100644 resources/views/events/gitlab/release/delete.blade.php diff --git a/lang/en/events/gitlab/issues.php b/lang/en/events/gitlab/issues.php index a8959f2..a8186aa 100644 --- a/lang/en/events/gitlab/issues.php +++ b/lang/en/events/gitlab/issues.php @@ -5,20 +5,6 @@ 'closed' => [ 'title' => 'šŸš« Issue Closed to šŸ¦Š :issue by :user', ], - 'edited' => [ - 'title' => 'āš ļø Issue has been edited to šŸ¦Š :issue by :user', - 'changes' => [ - 'title' => [ - 'name' => 'šŸ“– Title has been changed', - 'from' => 'šŸ“ From: :title_from', - 'to' => 'šŸ· To: :title_to', - ], - 'body' => [ - 'title' => 'šŸ“– Body has been changed', - 'message' => 'Please check the issue for more details', - ], - ], - ], 'opened' => [ 'title' => 'āš ļø New Issue to šŸ¦Š :issue by :user', ], diff --git a/lang/en/events/gitlab/release.php b/lang/en/events/gitlab/release.php new file mode 100644 index 0000000..d50cc0c --- /dev/null +++ b/lang/en/events/gitlab/release.php @@ -0,0 +1,9 @@ + [ + 'create' => 'āœ…šŸš€ Release Created - šŸ¦Š:repo by :user', + 'update' => 'šŸ“šŸš€ Release Updated - šŸ¦Š:repo by :user', + 'delete' => 'šŸš«šŸš€ Release Deleted - šŸ¦Š:repo by :user', + ], +]; diff --git a/resources/views/events/gitlab/release/create.blade.php b/resources/views/events/gitlab/release/create.blade.php index b53d922..4e564fa 100644 --- a/resources/views/events/gitlab/release/create.blade.php +++ b/resources/views/events/gitlab/release/create.blade.php @@ -1,14 +1,18 @@ Release Created - šŸ¦Šurl}\">{$payload->project->path_with_namespace}#{$payload->tag} by {$payload->commit->author->name}\n\n"; +?> -$message .= "šŸ”– {$payload->tag} \n"; +{!! __('tg-notifier::events/gitlab/release.title.create', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->tag}", + 'user' => "{$payload->commit->author->name}" + ] +) !!} -$message .= "šŸ—ž {$payload->name} \n"; +šŸ”– {{ $payload->tag }} +šŸ—ž {{ $payload->name }} -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/release/delete.blade.php b/resources/views/events/gitlab/release/delete.blade.php new file mode 100644 index 0000000..5cc8f74 --- /dev/null +++ b/resources/views/events/gitlab/release/delete.blade.php @@ -0,0 +1,18 @@ + + +{!! __('tg-notifier::events/gitlab/release.title.delete', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->tag}", + 'user' => "{$payload->commit->author->name}" + ] +) !!} + +šŸ”– {{ $payload->tag }} +šŸ—ž {{ $payload->name }} + +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/release/update.blade.php b/resources/views/events/gitlab/release/update.blade.php index e792f24..ec5355d 100644 --- a/resources/views/events/gitlab/release/update.blade.php +++ b/resources/views/events/gitlab/release/update.blade.php @@ -1,14 +1,18 @@ Release Updated - šŸ¦Šurl}\">{$payload->project->path_with_namespace}#{$payload->tag} by {$payload->commit->author->name}\n\n"; +?> -$message .= "šŸ”– {$payload->tag} \n"; +{!! __('tg-notifier::events/gitlab/release.title.update', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->tag}", + 'user' => "{$payload->commit->author->name}" + ] +) !!} -$message .= "šŸ—ž {$payload->name} \n"; +šŸ”– {{ $payload->tag }} +šŸ—ž {{ $payload->name }} -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) From 1abbdbde3892a8c5a002a91768aba3ade4f81a7f Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Thu, 23 Nov 2023 09:49:45 +0700 Subject: [PATCH 08/14] fix: update some events for gitlab --- lang/en/events/gitlab/tag_push.php | 7 +++++++ lang/en/events/gitlab/wiki_page.php | 10 ++++++++++ .../events/gitlab/tag_push/default.blade.php | 18 +++++++++++------- .../events/gitlab/wiki_page/create.blade.php | 14 +++++++++----- .../events/gitlab/wiki_page/delete.blade.php | 12 +++++++++--- .../events/gitlab/wiki_page/update.blade.php | 14 +++++++++----- 6 files changed, 55 insertions(+), 20 deletions(-) create mode 100644 lang/en/events/gitlab/tag_push.php create mode 100644 lang/en/events/gitlab/wiki_page.php diff --git a/lang/en/events/gitlab/tag_push.php b/lang/en/events/gitlab/tag_push.php new file mode 100644 index 0000000..d336c8d --- /dev/null +++ b/lang/en/events/gitlab/tag_push.php @@ -0,0 +1,7 @@ + 'āš™ļø A new tag has been pushed to the project šŸ¦Š:repo', + 'tag_name' => 'šŸ”– Tag Name: :tag_name', + 'pusher' => 'šŸ‘¤ Pushed by: :pusher', +]; diff --git a/lang/en/events/gitlab/wiki_page.php b/lang/en/events/gitlab/wiki_page.php new file mode 100644 index 0000000..a3ec98b --- /dev/null +++ b/lang/en/events/gitlab/wiki_page.php @@ -0,0 +1,10 @@ + [ + 'create' => 'šŸ“’ Wiki Page Created - šŸ¦Š:repo by :user', + 'update' => 'šŸ“ Wiki Page Updated - šŸ¦Š:repo by :user', + 'delete' => 'šŸ—‘ Wiki Page Deleted - šŸ¦Š:repo by :user', + ], + 'name' => 'šŸ“ Wiki Page Name: :name', +]; diff --git a/resources/views/events/gitlab/tag_push/default.blade.php b/resources/views/events/gitlab/tag_push/default.blade.php index 88295f2..25c1573 100644 --- a/resources/views/events/gitlab/tag_push/default.blade.php +++ b/resources/views/events/gitlab/tag_push/default.blade.php @@ -5,13 +5,17 @@ $ref = explode('/', $payload->ref); $tag = implode('/', array_slice($ref, 2)); +$tagUrl = $payload->project->web_url.'/tags/'.$tag; +?> -$tagUrl = $payload->project->web_url . '/tags/' . $tag; +{!! __('tg-notifier::events/gitlab/tag_push.title', [ + 'repo' => "{$payload->project->path_with_namespace}", + ]) !!} -$message = "āš™ļø A new tag has been pushed to the project šŸ¦Šproject->web_url}\">{$payload->project->path_with_namespace}\n\n"; +{!! __('tg-notifier::events/gitlab/tag_push.name', [ + 'tag_name' => "{$tag}", + ]) !!} -$message .= "šŸ”– Tag: {$tag}\n\n"; - -$message .= "šŸ‘¤ Pushed by : {$payload->user_name}\n"; - -echo $message; +{!! __('tg-notifier::events/gitlab/tag_push.pusher', [ + 'pusher' => "{$payload->user_name}", + ]) !!} diff --git a/resources/views/events/gitlab/wiki_page/create.blade.php b/resources/views/events/gitlab/wiki_page/create.blade.php index a75828d..0f15e39 100644 --- a/resources/views/events/gitlab/wiki_page/create.blade.php +++ b/resources/views/events/gitlab/wiki_page/create.blade.php @@ -1,12 +1,16 @@ Wiki Page Created - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->slug} by {$payload->user->name}\n\n"; +{!! __('tg-notifier::events/gitlab/wiki_page.title.create', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->slug}", + 'user' => "{$payload->user->name}" + ]) !!} -$message .= "šŸ· Title: {$payload->object_attributes->title} \n\n"; +{!! __('tg-notifier::events/gitlab/wiki_page.name', [ + 'name' => "{$payload->object_attributes->title}" + ]) !!} -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/wiki_page/delete.blade.php b/resources/views/events/gitlab/wiki_page/delete.blade.php index d2e93c4..6d54013 100644 --- a/resources/views/events/gitlab/wiki_page/delete.blade.php +++ b/resources/views/events/gitlab/wiki_page/delete.blade.php @@ -1,10 +1,16 @@ Wiki Page Deleted - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->slug} by {$payload->user->name}\n\n"; +{!! __('tg-notifier::events/gitlab/wiki_page.title.delete', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->slug}", + 'user' => "{$payload->user->name}" + ]) !!} -$message .= "šŸ· Title: {$payload->object_attributes->title} \n\n"; +{!! __('tg-notifier::events/gitlab/wiki_page.name', [ + 'name' => "{$payload->object_attributes->title}" + ]) !!} -echo $message; +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/wiki_page/update.blade.php b/resources/views/events/gitlab/wiki_page/update.blade.php index d564036..253c094 100644 --- a/resources/views/events/gitlab/wiki_page/update.blade.php +++ b/resources/views/events/gitlab/wiki_page/update.blade.php @@ -1,12 +1,16 @@ Wiki Page Updated - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->slug} by {$payload->user->name}\n\n"; +{!! __('tg-notifier::events/gitlab/wiki_page.title.update', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->slug}", + 'user' => "{$payload->user->name}" + ]) !!} -$message .= "šŸ· Title: {$payload->object_attributes->title} \n\n"; +{!! __('tg-notifier::events/gitlab/wiki_page.name', [ + 'name' => "{$payload->object_attributes->title}" + ]) !!} -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) From adccb31da283f62ed92c37a72c5f583aa208d794 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Thu, 23 Nov 2023 10:53:15 +0700 Subject: [PATCH 09/14] fix: update some events for gitlab --- lang/en/events/gitlab/note.php | 12 ++++++++++++ .../views/events/gitlab/issue/close.blade.php | 2 +- .../views/events/gitlab/issue/open.blade.php | 2 +- .../events/gitlab/issue/reopen.blade.php | 2 +- .../views/events/gitlab/note/commit.blade.php | 19 +++++++++++++------ .../views/events/gitlab/note/issue.blade.php | 12 ++++++++---- .../gitlab/note/merge_request.blade.php | 17 ++++++++++------- .../events/gitlab/note/snippet.blade.php | 16 ++++++++++------ .../events/gitlab/push/default.blade.php | 6 ++---- .../events/gitlab/release/create.blade.php | 5 ++--- .../events/gitlab/release/delete.blade.php | 5 ++--- .../events/gitlab/release/update.blade.php | 5 ++--- .../events/gitlab/wiki_page/create.blade.php | 2 +- .../events/gitlab/wiki_page/delete.blade.php | 2 +- .../events/gitlab/wiki_page/update.blade.php | 2 +- 15 files changed, 67 insertions(+), 42 deletions(-) create mode 100644 lang/en/events/gitlab/note.php diff --git a/lang/en/events/gitlab/note.php b/lang/en/events/gitlab/note.php new file mode 100644 index 0000000..ad42f0b --- /dev/null +++ b/lang/en/events/gitlab/note.php @@ -0,0 +1,12 @@ + [ + 'commit' => 'šŸ’¬ New Comment on Commit - šŸ¦Š:repo by :user', + 'issue' => 'šŸ’¬ New Comment on Issue - šŸ¦Š:repo by :user', + 'merge_request' => 'šŸ’¬ New Comment on Merge Request - šŸ¦Š:repo by :user', + 'snippet' => 'šŸ’¬ New Comment on Snippet - šŸ¦Š:repo by :user', + ], + 'view_comment' => 'šŸ”— View Comment: :link', + 'snippet_comment' => 'View Comment on Snippet', +]; diff --git a/resources/views/events/gitlab/issue/close.blade.php b/resources/views/events/gitlab/issue/close.blade.php index 0dd844a..f29edd2 100644 --- a/resources/views/events/gitlab/issue/close.blade.php +++ b/resources/views/events/gitlab/issue/close.blade.php @@ -6,7 +6,7 @@ ?> {!! __('tg-notifier::events/gitlab/issues.closed.title', [ - 'issue' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->id}", + 'issue' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->id}", 'user' => "{$payload->user->name}" ] ) !!} diff --git a/resources/views/events/gitlab/issue/open.blade.php b/resources/views/events/gitlab/issue/open.blade.php index a1a1220..f36dce8 100644 --- a/resources/views/events/gitlab/issue/open.blade.php +++ b/resources/views/events/gitlab/issue/open.blade.php @@ -6,7 +6,7 @@ ?> {!! __('tg-notifier::events/gitlab/issues.opened.title', [ - 'issue' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->id}", + 'issue' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->id}", 'user' => "{$payload->user->name}" ] ) !!} diff --git a/resources/views/events/gitlab/issue/reopen.blade.php b/resources/views/events/gitlab/issue/reopen.blade.php index 67c2646..71fdba3 100644 --- a/resources/views/events/gitlab/issue/reopen.blade.php +++ b/resources/views/events/gitlab/issue/reopen.blade.php @@ -6,7 +6,7 @@ ?> {!! __('tg-notifier::events/gitlab/issues.reopened.title', [ - 'issue' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->id}", + 'issue' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->id}", 'user' => "{$payload->user->name}" ] ) !!} diff --git a/resources/views/events/gitlab/note/commit.blade.php b/resources/views/events/gitlab/note/commit.blade.php index 0a084a4..501bd5f 100644 --- a/resources/views/events/gitlab/note/commit.blade.php +++ b/resources/views/events/gitlab/note/commit.blade.php @@ -1,14 +1,21 @@ New Comment on Commit - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace} by {$payload->user->name}\n\n"; +?> +{!! __('tg-notifier::events/gitlab/note.title.commit', [ + 'repo' => "{$payload->project->path_with_namespace}", + 'user' => "{$payload->user->name}" + ] +) !!} -$message .= "āš™ļø {$payload->commit->message} \n\n"; +āš™ļø {{ $payload->commit->message }} -$message .= "šŸ”— View Comment: object_attributes->url}\">{$payload->commit->id} \n\n"; +{!! __('tg-notifier::events/gitlab/note.view_comment', [ + 'link' => "{$payload->commit->id}" + ] +) !!} -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/note/issue.blade.php b/resources/views/events/gitlab/note/issue.blade.php index 309ecbf..8176539 100644 --- a/resources/views/events/gitlab/note/issue.blade.php +++ b/resources/views/events/gitlab/note/issue.blade.php @@ -3,10 +3,14 @@ * @var $payload object */ -$message = "šŸ’¬ New Comment on Issue - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->issue->iid} by {$payload->user->name}\n\n"; +?> -$message .= "šŸ“¢ {$payload->issue->title} \n\n"; +{!! __('tg-notifier::events/gitlab/note.title.issue', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->issue->iid}", + 'user' => "{$payload->user->name}" + ] +) !!} -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; +šŸ“¢ {{ $payload->issue->title }} -echo $message; +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/note/merge_request.blade.php b/resources/views/events/gitlab/note/merge_request.blade.php index 9c332d9..b7398d1 100644 --- a/resources/views/events/gitlab/note/merge_request.blade.php +++ b/resources/views/events/gitlab/note/merge_request.blade.php @@ -1,14 +1,17 @@ New Comment on Merge Request - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->merge_request->iid} by {$payload->user->name}\n\n"; +?> +{!! __('tg-notifier::events/gitlab/note.title.merge_request', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->merge_request->iid}", + 'user' => "{$payload->user->name}" + ] +) !!} -$message .= "šŸ›  {$payload->merge_request->title} \n"; +šŸ›  {{ $payload->merge_request->title }} +šŸŒ³ {{ $payload->merge_request->source_branch }} -> {{ $payload->merge_request->target_branch }} šŸŽÆ -$message .= "šŸŒ³ {$payload->merge_request->source_branch} -> {$payload->merge_request->target_branch} šŸŽÆ \n"; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/note/snippet.blade.php b/resources/views/events/gitlab/note/snippet.blade.php index a3fe97c..cc4e271 100644 --- a/resources/views/events/gitlab/note/snippet.blade.php +++ b/resources/views/events/gitlab/note/snippet.blade.php @@ -1,14 +1,18 @@ New Comment on Snippet - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace} by {$payload->user->name}\n\n"; +?> +{!! __('tg-notifier::events/gitlab/note.title.snippet', [ + 'repo' => "{$payload->project->path_with_namespace}", + 'user' => "{$payload->user->name}" + ] +) !!} -$message .= "šŸ“ {$payload->snippet->title} \n\n"; +šŸ“ {{ $payload->snippet->title }} -$message .= "šŸ”— object_attributes->url}\">View Comment \n\n"; +šŸ”— {{ __('tg-notifier::events/gitlab/note.snippet_comment') }} -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/push/default.blade.php b/resources/views/events/gitlab/push/default.blade.php index c552690..6f7adaf 100644 --- a/resources/views/events/gitlab/push/default.blade.php +++ b/resources/views/events/gitlab/push/default.blade.php @@ -15,8 +15,7 @@ 'noun' => $noun, 'repo' => $payload->project->path_with_namespace, 'branch' => $branch, - ] - ) !!} + ]) !!} @foreach($payload->commits as $commit) @php @@ -26,8 +25,7 @@ 'commit' => "$commitId", 'commit_message' => $commit->message, 'commit_by' => $commit->author->name, - ] -) !!} + ]) !!} @endforeach {!! __('tg-notifier::events/gitlab/push.default.pusher', ['name' => $payload->user_name]) !!} diff --git a/resources/views/events/gitlab/release/create.blade.php b/resources/views/events/gitlab/release/create.blade.php index 4e564fa..2e78ba8 100644 --- a/resources/views/events/gitlab/release/create.blade.php +++ b/resources/views/events/gitlab/release/create.blade.php @@ -8,9 +8,8 @@ {!! __('tg-notifier::events/gitlab/release.title.create', [ 'repo' => "{$payload->project->path_with_namespace}#{$payload->tag}", - 'user' => "{$payload->commit->author->name}" - ] -) !!} + 'user' => "{$payload->commit->author->name}" + ]) !!} šŸ”– {{ $payload->tag }} šŸ—ž {{ $payload->name }} diff --git a/resources/views/events/gitlab/release/delete.blade.php b/resources/views/events/gitlab/release/delete.blade.php index 5cc8f74..6369f46 100644 --- a/resources/views/events/gitlab/release/delete.blade.php +++ b/resources/views/events/gitlab/release/delete.blade.php @@ -8,9 +8,8 @@ {!! __('tg-notifier::events/gitlab/release.title.delete', [ 'repo' => "{$payload->project->path_with_namespace}#{$payload->tag}", - 'user' => "{$payload->commit->author->name}" - ] -) !!} + 'user' => "{$payload->commit->author->name}" + ]) !!} šŸ”– {{ $payload->tag }} šŸ—ž {{ $payload->name }} diff --git a/resources/views/events/gitlab/release/update.blade.php b/resources/views/events/gitlab/release/update.blade.php index ec5355d..880314d 100644 --- a/resources/views/events/gitlab/release/update.blade.php +++ b/resources/views/events/gitlab/release/update.blade.php @@ -8,9 +8,8 @@ {!! __('tg-notifier::events/gitlab/release.title.update', [ 'repo' => "{$payload->project->path_with_namespace}#{$payload->tag}", - 'user' => "{$payload->commit->author->name}" - ] -) !!} + 'user' => "{$payload->commit->author->name}" + ]) !!} šŸ”– {{ $payload->tag }} šŸ—ž {{ $payload->name }} diff --git a/resources/views/events/gitlab/wiki_page/create.blade.php b/resources/views/events/gitlab/wiki_page/create.blade.php index 0f15e39..00a25de 100644 --- a/resources/views/events/gitlab/wiki_page/create.blade.php +++ b/resources/views/events/gitlab/wiki_page/create.blade.php @@ -6,7 +6,7 @@ {!! __('tg-notifier::events/gitlab/wiki_page.title.create', [ 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->slug}", - 'user' => "{$payload->user->name}" + 'user' => "{$payload->user->name}" ]) !!} {!! __('tg-notifier::events/gitlab/wiki_page.name', [ diff --git a/resources/views/events/gitlab/wiki_page/delete.blade.php b/resources/views/events/gitlab/wiki_page/delete.blade.php index 6d54013..1ae8867 100644 --- a/resources/views/events/gitlab/wiki_page/delete.blade.php +++ b/resources/views/events/gitlab/wiki_page/delete.blade.php @@ -6,7 +6,7 @@ {!! __('tg-notifier::events/gitlab/wiki_page.title.delete', [ 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->slug}", - 'user' => "{$payload->user->name}" + 'user' => "{$payload->user->name}" ]) !!} {!! __('tg-notifier::events/gitlab/wiki_page.name', [ diff --git a/resources/views/events/gitlab/wiki_page/update.blade.php b/resources/views/events/gitlab/wiki_page/update.blade.php index 253c094..f7176eb 100644 --- a/resources/views/events/gitlab/wiki_page/update.blade.php +++ b/resources/views/events/gitlab/wiki_page/update.blade.php @@ -6,7 +6,7 @@ {!! __('tg-notifier::events/gitlab/wiki_page.title.update', [ 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->slug}", - 'user' => "{$payload->user->name}" + 'user' => "{$payload->user->name}" ]) !!} {!! __('tg-notifier::events/gitlab/wiki_page.name', [ From 936b0462b8385457c3b2acd6d71127829c762497 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Thu, 23 Nov 2023 11:04:09 +0700 Subject: [PATCH 10/14] fix: update issues events for gitlab --- lang/en/events/gitlab/issues.php | 3 +++ .../views/events/gitlab/issue/update.blade.php | 17 ++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lang/en/events/gitlab/issues.php b/lang/en/events/gitlab/issues.php index a8186aa..a70364d 100644 --- a/lang/en/events/gitlab/issues.php +++ b/lang/en/events/gitlab/issues.php @@ -5,6 +5,9 @@ 'closed' => [ 'title' => 'šŸš« Issue Closed to šŸ¦Š :issue by :user', ], + 'edited' => [ + 'title' => 'āš ļø Issue has been edited to šŸ¦Š :issue by :user', + ], 'opened' => [ 'title' => 'āš ļø New Issue to šŸ¦Š :issue by :user', ], diff --git a/resources/views/events/gitlab/issue/update.blade.php b/resources/views/events/gitlab/issue/update.blade.php index e79ba8c..c1ace3f 100644 --- a/resources/views/events/gitlab/issue/update.blade.php +++ b/resources/views/events/gitlab/issue/update.blade.php @@ -1,14 +1,17 @@ Issue has been edited to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->id} by {$payload->user->name}\n\n"; +?> +{!! __('tg-notifier::events/gitlab/issues.edited.title', [ + 'issue' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->id}", + 'user' => "{$payload->user->name}" + ] + ) !!} -$message .= "šŸ“¢ {$payload->object_attributes->title}\n"; +šŸ“¢ {{ $payload->object_attributes->title }} -$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) From 5e37b8e79d2f096283af551cb8b517553991317a Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Thu, 23 Nov 2023 11:25:50 +0700 Subject: [PATCH 11/14] fix: update issues events for gitlab --- lang/en/events/gitlab/issues.php | 11 +++++++++++ resources/views/events/gitlab/issue/update.blade.php | 11 ++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/lang/en/events/gitlab/issues.php b/lang/en/events/gitlab/issues.php index a70364d..a8959f2 100644 --- a/lang/en/events/gitlab/issues.php +++ b/lang/en/events/gitlab/issues.php @@ -7,6 +7,17 @@ ], 'edited' => [ 'title' => 'āš ļø Issue has been edited to šŸ¦Š :issue by :user', + 'changes' => [ + 'title' => [ + 'name' => 'šŸ“– Title has been changed', + 'from' => 'šŸ“ From: :title_from', + 'to' => 'šŸ· To: :title_to', + ], + 'body' => [ + 'title' => 'šŸ“– Body has been changed', + 'message' => 'Please check the issue for more details', + ], + ], ], 'opened' => [ 'title' => 'āš ļø New Issue to šŸ¦Š :issue by :user', diff --git a/resources/views/events/gitlab/issue/update.blade.php b/resources/views/events/gitlab/issue/update.blade.php index c1ace3f..d528d82 100644 --- a/resources/views/events/gitlab/issue/update.blade.php +++ b/resources/views/events/gitlab/issue/update.blade.php @@ -14,4 +14,13 @@ šŸ“¢ {{ $payload->object_attributes->title }} @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) -@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) + +@if(isset($payload->changes->title)) +{!! __('tg-notifier::events/gitlab/issues.edited.changes.title.name') !!} + {!! __('tg-notifier::events/gitlab/issues.edited.changes.title.from', ['title_from' => $payload->changes->title->previous]) !!} + {!! __('tg-notifier::events/gitlab/issues.edited.changes.title.to', ['title_to' => $payload->changes->title->current]) !!} +@endif +@if(isset($payload->changes->description)) +{!! __('tg-notifier::events/gitlab/issues.edited.changes.body.title') !!} + {!! __('tg-notifier::events/gitlab/issues.edited.changes.body.message') !!} +@endif From 81cebcf59ce1f5d2b2ec53efdce641eafe8c401c Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Thu, 23 Nov 2023 13:50:16 +0700 Subject: [PATCH 12/14] fix: update merge request events for gitlab --- lang/en/events/gitlab/merge_request.php | 29 +++++++++++++++++++ .../gitlab/merge_request/approval.blade.php | 18 ++++++++++++ .../gitlab/merge_request/approved.blade.php | 22 +++++++------- .../gitlab/merge_request/close.blade.php | 22 +++++++------- .../gitlab/merge_request/merge.blade.php | 22 +++++++------- .../gitlab/merge_request/open.blade.php | 22 +++++++------- .../partials/_reviewers.blade.php | 5 ++-- .../gitlab/merge_request/reopen.blade.php | 22 +++++++------- .../gitlab/merge_request/unapproval.blade.php | 22 +++++++------- .../gitlab/merge_request/unapproved.blade.php | 22 +++++++------- .../gitlab/merge_request/update.blade.php | 22 +++++++------- 11 files changed, 138 insertions(+), 90 deletions(-) create mode 100644 lang/en/events/gitlab/merge_request.php create mode 100644 resources/views/events/gitlab/merge_request/approval.blade.php diff --git a/lang/en/events/gitlab/merge_request.php b/lang/en/events/gitlab/merge_request.php new file mode 100644 index 0000000..c0f63ca --- /dev/null +++ b/lang/en/events/gitlab/merge_request.php @@ -0,0 +1,29 @@ + 'šŸ‘„ Reviewers: ', + 'closed' => [ + 'title' => 'āŒ Merge Request Closed - šŸ¦Š:repo by :user', + ], + 'merged' => [ + 'title' => 'āœ… Merge Request Merged - šŸ¦Š:repo by :user', + ], + 'opened' => [ + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø New Merge Request - šŸ¦Š:issue by :user', + ], + 'reopened' => [ + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø Merge Request Reopened - šŸ¦Š:issue by :user', + ], + 'approved' => [ + 'title' => 'šŸ‘ Merge Request Approved āœ… - šŸ¦Š:issue by :user', + ], + 'unapproved' => [ + 'title' => 'šŸ‘Ž Merge Request Unapproved āŒ - šŸ¦Š:issue by :user', + ], + 'approval' => [ + 'title' => 'šŸ‘ Merge Request Approval āœ… - šŸ¦Š:issue by :user', + ], + 'unapproval' => [ + 'title' => 'šŸ‘Ž Merge Request Unapproval āŒ - šŸ¦Š:issue by :user', + ], +]; diff --git a/resources/views/events/gitlab/merge_request/approval.blade.php b/resources/views/events/gitlab/merge_request/approval.blade.php new file mode 100644 index 0000000..9d6fe90 --- /dev/null +++ b/resources/views/events/gitlab/merge_request/approval.blade.php @@ -0,0 +1,18 @@ + +{!! __('tg-notifier::events/gitlab/merge_request.approval.title', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}", + 'user' => "{$payload->user->name}" + ]) !!} + +šŸ›  {{ $payload->object_attributes->title }} + +šŸŒ³ {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} šŸŽÆ +@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) +@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/merge_request/approved.blade.php b/resources/views/events/gitlab/merge_request/approved.blade.php index 4fcaffe..b29b190 100644 --- a/resources/views/events/gitlab/merge_request/approved.blade.php +++ b/resources/views/events/gitlab/merge_request/approved.blade.php @@ -1,18 +1,18 @@ Merge Request Approved to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid} by {$payload->user->name}\n\n"; +?> +{!! __('tg-notifier::events/gitlab/merge_request.approved.title', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}", + 'user' => "{$payload->user->name}" + ]) !!} -$message .= "šŸ›  {$payload->object_attributes->title} \n\n"; +šŸ›  {{ $payload->object_attributes->title }} -$message .= "šŸŒ³ {$payload->object_attributes->source_branch} -> {$payload->object_attributes->target_branch} šŸŽÆ \n"; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; - -$message .= require __DIR__ . '/partials/_reviewers.php'; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +šŸŒ³ {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} šŸŽÆ +@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) +@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/merge_request/close.blade.php b/resources/views/events/gitlab/merge_request/close.blade.php index 67d9cce..1478ab7 100644 --- a/resources/views/events/gitlab/merge_request/close.blade.php +++ b/resources/views/events/gitlab/merge_request/close.blade.php @@ -1,18 +1,18 @@ Close Merge Request - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid} by {$payload->user->name}\n\n"; +?> +{!! __('tg-notifier::events/gitlab/merge_request.closed.title', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}", + 'user' => "{$payload->user->name}" + ]) !!} -$message .= "šŸ›  {$payload->object_attributes->title} \n\n"; +šŸ›  {{ $payload->object_attributes->title }} -$message .= "šŸŒ³ {$payload->object_attributes->source_branch} -> {$payload->object_attributes->target_branch} šŸŽÆ \n"; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; - -$message .= require __DIR__ . '/partials/_reviewers.php'; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +šŸŒ³ {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} šŸŽÆ +@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) +@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/merge_request/merge.blade.php b/resources/views/events/gitlab/merge_request/merge.blade.php index 90f4c56..039860e 100644 --- a/resources/views/events/gitlab/merge_request/merge.blade.php +++ b/resources/views/events/gitlab/merge_request/merge.blade.php @@ -1,18 +1,18 @@ Merge Request Merged to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid} by {$payload->user->name}\n\n"; +?> +{!! __('tg-notifier::events/gitlab/merge_request.merged.title', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}", + 'user' => "{$payload->user->name}" + ]) !!} -$message .= "šŸ›  {$payload->object_attributes->title} \n\n"; +šŸ›  {{ $payload->object_attributes->title }} -$message .= "šŸŒ³ {$payload->object_attributes->source_branch} -> {$payload->object_attributes->target_branch} šŸŽÆ \n"; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; - -$message .= require __DIR__ . '/partials/_reviewers.php'; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +šŸŒ³ {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} šŸŽÆ +@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) +@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/merge_request/open.blade.php b/resources/views/events/gitlab/merge_request/open.blade.php index d96110e..287dab7 100644 --- a/resources/views/events/gitlab/merge_request/open.blade.php +++ b/resources/views/events/gitlab/merge_request/open.blade.php @@ -1,18 +1,18 @@ Merge Request Opened to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid} by {$payload->user->name}\n\n"; +?> +{!! __('tg-notifier::events/gitlab/merge_request.opened.title', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}", + 'user' => "{$payload->user->name}" + ]) !!} -$message .= "šŸ›  {$payload->object_attributes->title} \n\n"; +šŸ›  {{ $payload->object_attributes->title }} -$message .= "šŸŒ³ {$payload->object_attributes->source_branch} -> {$payload->object_attributes->target_branch} šŸŽÆ \n"; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; - -$message .= require __DIR__ . '/partials/_reviewers.php'; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +šŸŒ³ {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} šŸŽÆ +@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) +@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/merge_request/partials/_reviewers.blade.php b/resources/views/events/gitlab/merge_request/partials/_reviewers.blade.php index b8ed8ca..3da23f8 100644 --- a/resources/views/events/gitlab/merge_request/partials/_reviewers.blade.php +++ b/resources/views/events/gitlab/merge_request/partials/_reviewers.blade.php @@ -11,6 +11,7 @@ } $textReviewers .= "šŸ‘„ Reviewers: " . implode(', ', $reviewers) . "\n"; + $textReviewers .= __('tg-notifier::events/gitlab/merge_request.review') . implode(', ', $reviewers); } - -return $textReviewers; +?> +{!! $textReviewers !!} diff --git a/resources/views/events/gitlab/merge_request/reopen.blade.php b/resources/views/events/gitlab/merge_request/reopen.blade.php index 9a5e7e3..287dab7 100644 --- a/resources/views/events/gitlab/merge_request/reopen.blade.php +++ b/resources/views/events/gitlab/merge_request/reopen.blade.php @@ -1,18 +1,18 @@ Merge Request Reopened to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid} by {$payload->user->name}\n\n"; +?> +{!! __('tg-notifier::events/gitlab/merge_request.opened.title', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}", + 'user' => "{$payload->user->name}" + ]) !!} -$message .= "šŸ›  {$payload->object_attributes->title} \n\n"; +šŸ›  {{ $payload->object_attributes->title }} -$message .= "šŸŒ³ {$payload->object_attributes->source_branch} -> {$payload->object_attributes->target_branch} šŸŽÆ \n"; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; - -$message .= require __DIR__ . '/partials/_reviewers.php'; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +šŸŒ³ {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} šŸŽÆ +@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) +@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/merge_request/unapproval.blade.php b/resources/views/events/gitlab/merge_request/unapproval.blade.php index 997203b..8b2bea6 100644 --- a/resources/views/events/gitlab/merge_request/unapproval.blade.php +++ b/resources/views/events/gitlab/merge_request/unapproval.blade.php @@ -1,18 +1,18 @@ Merge Request Unapproved to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid} by {$payload->user->name}\n\n"; +?> +{!! __('tg-notifier::events/gitlab/merge_request.unapproval.title', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}", + 'user' => "{$payload->user->name}" + ]) !!} -$message .= "šŸ›  {$payload->object_attributes->title} \n\n"; +šŸ›  {{ $payload->object_attributes->title }} -$message .= "šŸŒ³ {$payload->object_attributes->source_branch} -> {$payload->object_attributes->target_branch} šŸŽÆ \n"; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; - -$message .= require __DIR__ . '/partials/_reviewers.php'; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +šŸŒ³ {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} šŸŽÆ +@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) +@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/merge_request/unapproved.blade.php b/resources/views/events/gitlab/merge_request/unapproved.blade.php index 67d9cce..f3af320 100644 --- a/resources/views/events/gitlab/merge_request/unapproved.blade.php +++ b/resources/views/events/gitlab/merge_request/unapproved.blade.php @@ -1,18 +1,18 @@ Close Merge Request - šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid} by {$payload->user->name}\n\n"; +?> +{!! __('tg-notifier::events/gitlab/merge_request.unapproved.title', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}", + 'user' => "{$payload->user->name}" + ]) !!} -$message .= "šŸ›  {$payload->object_attributes->title} \n\n"; +šŸ›  {{ $payload->object_attributes->title }} -$message .= "šŸŒ³ {$payload->object_attributes->source_branch} -> {$payload->object_attributes->target_branch} šŸŽÆ \n"; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; - -$message .= require __DIR__ . '/partials/_reviewers.php'; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +šŸŒ³ {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} šŸŽÆ +@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) +@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/merge_request/update.blade.php b/resources/views/events/gitlab/merge_request/update.blade.php index dd0a4df..b874365 100644 --- a/resources/views/events/gitlab/merge_request/update.blade.php +++ b/resources/views/events/gitlab/merge_request/update.blade.php @@ -1,18 +1,18 @@ Merge Request Updated to šŸ¦Šobject_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid} by {$payload->user->name}\n\n"; +?> +{!! __('tg-notifier::events/gitlab/merge_request.update.title', [ + 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}", + 'user' => "{$payload->user->name}" + ]) !!} -$message .= "šŸ›  {$payload->object_attributes->title} \n\n"; +šŸ›  {{ $payload->object_attributes->title }} -$message .= "šŸŒ³ {$payload->object_attributes->source_branch} -> {$payload->object_attributes->target_branch} šŸŽÆ \n"; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; - -$message .= require __DIR__ . '/partials/_reviewers.php'; - -$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; - -echo $message; +šŸŒ³ {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} šŸŽÆ +@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) +@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) +@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) From f6f09ed35bd921a2e1bf8b3f6a73bb0129260678 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Thu, 23 Nov 2023 14:59:32 +0700 Subject: [PATCH 13/14] fix: update view template for some events --- lang/en/events/github/pull_request.php | 8 ++++---- lang/en/events/gitlab/merge_request.php | 17 ++++++++++------- lang/en/events/gitlab/tag_push.php | 2 +- lang/en/events/gitlab/wiki_page.php | 2 +- .../events/github/pull_request/closed.blade.php | 9 ++++----- .../events/github/pull_request/opened.blade.php | 2 +- .../github/pull_request/reopened.blade.php | 2 +- .../merge_request/partials/_reviewers.blade.php | 1 - .../gitlab/merge_request/reopen.blade.php | 2 +- .../events/gitlab/wiki_page/create.blade.php | 1 + .../events/gitlab/wiki_page/delete.blade.php | 1 + .../events/gitlab/wiki_page/update.blade.php | 1 + 12 files changed, 26 insertions(+), 22 deletions(-) diff --git a/lang/en/events/github/pull_request.php b/lang/en/events/github/pull_request.php index 8fdcf31..088ccb7 100644 --- a/lang/en/events/github/pull_request.php +++ b/lang/en/events/github/pull_request.php @@ -3,14 +3,14 @@ return [ 'review' => 'šŸ‘„ Reviewers: ', 'closed' => [ - 'title' => ':title - šŸ¦‘:issue by :user', + 'title' => ':title - šŸ¦‘:repo by :user', 'title_merged' => 'āœ… Pull Request Merged', - 'title_closed' => 'āŒ Pull Request Closed', + 'title_closed' => 'šŸš« Pull Request Closed', ], 'opened' => [ - 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø New Pull Request - šŸ¦‘:issue by :user', + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø New Pull Request - šŸ¦‘:repo by :user', ], 'reopened' => [ - 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø Reopened Pull Request - šŸ¦‘:issue by :user', + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø Reopened Pull Request - šŸ¦‘:repo by :user', ], ]; diff --git a/lang/en/events/gitlab/merge_request.php b/lang/en/events/gitlab/merge_request.php index c0f63ca..f333adb 100644 --- a/lang/en/events/gitlab/merge_request.php +++ b/lang/en/events/gitlab/merge_request.php @@ -3,27 +3,30 @@ return [ 'review' => 'šŸ‘„ Reviewers: ', 'closed' => [ - 'title' => 'āŒ Merge Request Closed - šŸ¦Š:repo by :user', + 'title' => 'šŸš« Merge Request Closed - šŸ¦Š:repo by :user', ], 'merged' => [ 'title' => 'āœ… Merge Request Merged - šŸ¦Š:repo by :user', ], 'opened' => [ - 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø New Merge Request - šŸ¦Š:issue by :user', + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø New Merge Request - šŸ¦Š:repo by :user', ], 'reopened' => [ - 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø Merge Request Reopened - šŸ¦Š:issue by :user', + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø Merge Request Reopened - šŸ¦Š:repo by :user', ], 'approved' => [ - 'title' => 'šŸ‘ Merge Request Approved āœ… - šŸ¦Š:issue by :user', + 'title' => 'šŸ‘ Merge Request Approved āœ… - šŸ¦Š:repo by :user', ], 'unapproved' => [ - 'title' => 'šŸ‘Ž Merge Request Unapproved āŒ - šŸ¦Š:issue by :user', + 'title' => 'šŸ‘Ž Merge Request Unapproved āŒ - šŸ¦Š:repo by :user', ], 'approval' => [ - 'title' => 'šŸ‘ Merge Request Approval āœ… - šŸ¦Š:issue by :user', + 'title' => 'šŸ‘ Merge Request Approval āœ… - šŸ¦Š:repo by :user', ], 'unapproval' => [ - 'title' => 'šŸ‘Ž Merge Request Unapproval āŒ - šŸ¦Š:issue by :user', + 'title' => 'šŸ‘Ž Merge Request Unapproval āŒ - šŸ¦Š:repo by :user', + ], + 'update' => [ + 'title' => 'šŸ› ļø Merge Request Updated - šŸ¦Š:repo by :user', ], ]; diff --git a/lang/en/events/gitlab/tag_push.php b/lang/en/events/gitlab/tag_push.php index d336c8d..d405f85 100644 --- a/lang/en/events/gitlab/tag_push.php +++ b/lang/en/events/gitlab/tag_push.php @@ -2,6 +2,6 @@ return [ 'title' => 'āš™ļø A new tag has been pushed to the project šŸ¦Š:repo', - 'tag_name' => 'šŸ”– Tag Name: :tag_name', + 'name' => 'šŸ”– Tag Name: :tag_name', 'pusher' => 'šŸ‘¤ Pushed by: :pusher', ]; diff --git a/lang/en/events/gitlab/wiki_page.php b/lang/en/events/gitlab/wiki_page.php index a3ec98b..c700d96 100644 --- a/lang/en/events/gitlab/wiki_page.php +++ b/lang/en/events/gitlab/wiki_page.php @@ -6,5 +6,5 @@ 'update' => 'šŸ“ Wiki Page Updated - šŸ¦Š:repo by :user', 'delete' => 'šŸ—‘ Wiki Page Deleted - šŸ¦Š:repo by :user', ], - 'name' => 'šŸ“ Wiki Page Name: :name', + 'name' => 'šŸ“ Page Name: :name', ]; diff --git a/resources/views/events/github/pull_request/closed.blade.php b/resources/views/events/github/pull_request/closed.blade.php index b806786..b93cdb3 100644 --- a/resources/views/events/github/pull_request/closed.blade.php +++ b/resources/views/events/github/pull_request/closed.blade.php @@ -13,11 +13,10 @@ ?> {!! __('tg-notifier::events/github/pull_request.closed.title', [ - 'title' => $message, - 'issue' => "{$payload->repository->full_name}#$pull_request->number", - 'user' => "@{$pull_request->user->login}" - ] - ) !!} + 'title' => $message, + 'repo' => "{$payload->repository->full_name}#$pull_request->number", + 'user' => "@{$pull_request->user->login}" + ]) !!} šŸ“¢ {{ $pull_request->title }} diff --git a/resources/views/events/github/pull_request/opened.blade.php b/resources/views/events/github/pull_request/opened.blade.php index d6a1e8b..7b8d443 100644 --- a/resources/views/events/github/pull_request/opened.blade.php +++ b/resources/views/events/github/pull_request/opened.blade.php @@ -8,7 +8,7 @@ ?> {!! __('tg-notifier::events/github/pull_request.opened.title', [ - 'issue' => "{$payload->repository->full_name}#$pull_request->number", + 'repo' => "{$payload->repository->full_name}#$pull_request->number", 'user' => "@{$pull_request->user->login}" ] ) !!} diff --git a/resources/views/events/github/pull_request/reopened.blade.php b/resources/views/events/github/pull_request/reopened.blade.php index 4ede743..dcf9545 100644 --- a/resources/views/events/github/pull_request/reopened.blade.php +++ b/resources/views/events/github/pull_request/reopened.blade.php @@ -8,7 +8,7 @@ ?> {!! __('tg-notifier::events/github/pull_request.reopened.title', [ - 'issue' => "{$payload->repository->full_name}#$pull_request->number", + 'repo' => "{$payload->repository->full_name}#$pull_request->number", 'user' => "@{$pull_request->user->login}" ] ) !!} diff --git a/resources/views/events/gitlab/merge_request/partials/_reviewers.blade.php b/resources/views/events/gitlab/merge_request/partials/_reviewers.blade.php index 3da23f8..4ea3759 100644 --- a/resources/views/events/gitlab/merge_request/partials/_reviewers.blade.php +++ b/resources/views/events/gitlab/merge_request/partials/_reviewers.blade.php @@ -10,7 +10,6 @@ $reviewers[] = "{$reviewer->name}"; } - $textReviewers .= "šŸ‘„ Reviewers: " . implode(', ', $reviewers) . "\n"; $textReviewers .= __('tg-notifier::events/gitlab/merge_request.review') . implode(', ', $reviewers); } ?> diff --git a/resources/views/events/gitlab/merge_request/reopen.blade.php b/resources/views/events/gitlab/merge_request/reopen.blade.php index 287dab7..c33cb93 100644 --- a/resources/views/events/gitlab/merge_request/reopen.blade.php +++ b/resources/views/events/gitlab/merge_request/reopen.blade.php @@ -5,7 +5,7 @@ */ ?> -{!! __('tg-notifier::events/gitlab/merge_request.opened.title', [ +{!! __('tg-notifier::events/gitlab/merge_request.reopened.title', [ 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}", 'user' => "{$payload->user->name}" ]) !!} diff --git a/resources/views/events/gitlab/wiki_page/create.blade.php b/resources/views/events/gitlab/wiki_page/create.blade.php index 00a25de..df86002 100644 --- a/resources/views/events/gitlab/wiki_page/create.blade.php +++ b/resources/views/events/gitlab/wiki_page/create.blade.php @@ -4,6 +4,7 @@ * @var $event string */ +?> {!! __('tg-notifier::events/gitlab/wiki_page.title.create', [ 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->slug}", 'user' => "{$payload->user->name}" diff --git a/resources/views/events/gitlab/wiki_page/delete.blade.php b/resources/views/events/gitlab/wiki_page/delete.blade.php index 1ae8867..2bffcfe 100644 --- a/resources/views/events/gitlab/wiki_page/delete.blade.php +++ b/resources/views/events/gitlab/wiki_page/delete.blade.php @@ -4,6 +4,7 @@ * @var $event string */ +?> {!! __('tg-notifier::events/gitlab/wiki_page.title.delete', [ 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->slug}", 'user' => "{$payload->user->name}" diff --git a/resources/views/events/gitlab/wiki_page/update.blade.php b/resources/views/events/gitlab/wiki_page/update.blade.php index f7176eb..6ba7779 100644 --- a/resources/views/events/gitlab/wiki_page/update.blade.php +++ b/resources/views/events/gitlab/wiki_page/update.blade.php @@ -4,6 +4,7 @@ * @var $event string */ +?> {!! __('tg-notifier::events/gitlab/wiki_page.title.update', [ 'repo' => "{$payload->project->path_with_namespace}#{$payload->object_attributes->slug}", 'user' => "{$payload->user->name}" From d20507db24b2704df065fe20f745a8a8b3074d8d Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Thu, 23 Nov 2023 15:32:04 +0700 Subject: [PATCH 14/14] update multi lang --- lang/de/events/github/pull_request.php | 8 +++---- lang/de/events/github/push.php | 6 ++--- lang/de/events/github/workflow_run.php | 2 +- lang/de/events/gitlab/feature_flag.php | 9 +++++++ lang/de/events/gitlab/issues.php | 28 ++++++++++++++++++++++ lang/de/events/gitlab/merge_request.php | 32 +++++++++++++++++++++++++ lang/de/events/gitlab/note.php | 12 ++++++++++ lang/de/events/gitlab/push.php | 9 +++++++ lang/de/events/gitlab/release.php | 9 +++++++ lang/de/events/gitlab/tag_push.php | 7 ++++++ lang/de/events/gitlab/wiki_page.php | 10 ++++++++ lang/de/events/shared/gitlab.php | 10 ++++++++ lang/ja/events/github/pull_request.php | 8 +++---- lang/ja/events/github/push.php | 6 ++--- lang/ja/events/github/workflow_run.php | 2 +- lang/ja/events/gitlab/feature_flag.php | 9 +++++++ lang/ja/events/gitlab/issues.php | 28 ++++++++++++++++++++++ lang/ja/events/gitlab/merge_request.php | 32 +++++++++++++++++++++++++ lang/ja/events/gitlab/note.php | 12 ++++++++++ lang/ja/events/gitlab/push.php | 9 +++++++ lang/ja/events/gitlab/release.php | 9 +++++++ lang/ja/events/gitlab/tag_push.php | 7 ++++++ lang/ja/events/gitlab/wiki_page.php | 10 ++++++++ lang/ja/events/shared/gitlab.php | 10 ++++++++ lang/vi/events/github/pull_request.php | 8 +++---- lang/vi/events/github/push.php | 6 ++--- lang/vi/events/github/workflow_run.php | 2 +- lang/vi/events/gitlab/feature_flag.php | 9 +++++++ lang/vi/events/gitlab/issues.php | 28 ++++++++++++++++++++++ lang/vi/events/gitlab/merge_request.php | 32 +++++++++++++++++++++++++ lang/vi/events/gitlab/note.php | 12 ++++++++++ lang/vi/events/gitlab/push.php | 9 +++++++ lang/vi/events/gitlab/release.php | 9 +++++++ lang/vi/events/gitlab/tag_push.php | 7 ++++++ lang/vi/events/gitlab/wiki_page.php | 10 ++++++++ lang/vi/events/shared/gitlab.php | 10 ++++++++ 36 files changed, 402 insertions(+), 24 deletions(-) create mode 100644 lang/de/events/gitlab/feature_flag.php create mode 100644 lang/de/events/gitlab/issues.php create mode 100644 lang/de/events/gitlab/merge_request.php create mode 100644 lang/de/events/gitlab/note.php create mode 100644 lang/de/events/gitlab/push.php create mode 100644 lang/de/events/gitlab/release.php create mode 100644 lang/de/events/gitlab/tag_push.php create mode 100644 lang/de/events/gitlab/wiki_page.php create mode 100644 lang/de/events/shared/gitlab.php create mode 100644 lang/ja/events/gitlab/feature_flag.php create mode 100644 lang/ja/events/gitlab/issues.php create mode 100644 lang/ja/events/gitlab/merge_request.php create mode 100644 lang/ja/events/gitlab/note.php create mode 100644 lang/ja/events/gitlab/push.php create mode 100644 lang/ja/events/gitlab/release.php create mode 100644 lang/ja/events/gitlab/tag_push.php create mode 100644 lang/ja/events/gitlab/wiki_page.php create mode 100644 lang/ja/events/shared/gitlab.php create mode 100644 lang/vi/events/gitlab/feature_flag.php create mode 100644 lang/vi/events/gitlab/issues.php create mode 100644 lang/vi/events/gitlab/merge_request.php create mode 100644 lang/vi/events/gitlab/note.php create mode 100644 lang/vi/events/gitlab/push.php create mode 100644 lang/vi/events/gitlab/release.php create mode 100644 lang/vi/events/gitlab/tag_push.php create mode 100644 lang/vi/events/gitlab/wiki_page.php create mode 100644 lang/vi/events/shared/gitlab.php diff --git a/lang/de/events/github/pull_request.php b/lang/de/events/github/pull_request.php index 8fdcf31..088ccb7 100644 --- a/lang/de/events/github/pull_request.php +++ b/lang/de/events/github/pull_request.php @@ -3,14 +3,14 @@ return [ 'review' => 'šŸ‘„ Reviewers: ', 'closed' => [ - 'title' => ':title - šŸ¦‘:issue by :user', + 'title' => ':title - šŸ¦‘:repo by :user', 'title_merged' => 'āœ… Pull Request Merged', - 'title_closed' => 'āŒ Pull Request Closed', + 'title_closed' => 'šŸš« Pull Request Closed', ], 'opened' => [ - 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø New Pull Request - šŸ¦‘:issue by :user', + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø New Pull Request - šŸ¦‘:repo by :user', ], 'reopened' => [ - 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø Reopened Pull Request - šŸ¦‘:issue by :user', + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø Reopened Pull Request - šŸ¦‘:repo by :user', ], ]; diff --git a/lang/de/events/github/push.php b/lang/de/events/github/push.php index 9d65e90..e37a931 100644 --- a/lang/de/events/github/push.php +++ b/lang/de/events/github/push.php @@ -2,8 +2,8 @@ return [ 'default' => [ - 'title' => 'šŸ‘·āš™ļø :count new :noun to šŸ¦‘:user::branch', - 'commit' => ':commit: :commit_message - by :commit_by', - 'pushed' => 'šŸ‘¤ Pushed by : :name', + 'title' => 'šŸ‘·āš™ļø :count new :noun to šŸ¦Š:repo::branch', + 'commit' => '[:commit] :commit_message - by :commit_by', + 'pusher' => 'šŸ‘¤ Pushed by : :name', ], ]; diff --git a/lang/de/events/github/workflow_run.php b/lang/de/events/github/workflow_run.php index 4e895d4..f6cff4d 100644 --- a/lang/de/events/github/workflow_run.php +++ b/lang/de/events/github/workflow_run.php @@ -23,5 +23,5 @@ 'title' => ' Workflow Requested form šŸ¦‘:user', 'body' => 'Running workflow: šŸ’„ :name ā³', ], - 'link' => 'šŸ”— Link: :link', + 'link' => 'šŸ”— Workflow run link: :link', ]; diff --git a/lang/de/events/gitlab/feature_flag.php b/lang/de/events/gitlab/feature_flag.php new file mode 100644 index 0000000..4380727 --- /dev/null +++ b/lang/de/events/gitlab/feature_flag.php @@ -0,0 +1,9 @@ + [ + 'enabled' => 'Feature Flag Enabled šŸ¦Š:flag_tag by :user_tag', + 'disabled' => 'Feature Flag Disabled šŸ¦Š:flag_tag by :user_tag', + ], + 'name' => 'Name: :flag_name', +]; diff --git a/lang/de/events/gitlab/issues.php b/lang/de/events/gitlab/issues.php new file mode 100644 index 0000000..a8959f2 --- /dev/null +++ b/lang/de/events/gitlab/issues.php @@ -0,0 +1,28 @@ + 'šŸ“¢', + 'closed' => [ + 'title' => 'šŸš« Issue Closed to šŸ¦Š :issue by :user', + ], + 'edited' => [ + 'title' => 'āš ļø Issue has been edited to šŸ¦Š :issue by :user', + 'changes' => [ + 'title' => [ + 'name' => 'šŸ“– Title has been changed', + 'from' => 'šŸ“ From: :title_from', + 'to' => 'šŸ· To: :title_to', + ], + 'body' => [ + 'title' => 'šŸ“– Body has been changed', + 'message' => 'Please check the issue for more details', + ], + ], + ], + 'opened' => [ + 'title' => 'āš ļø New Issue to šŸ¦Š :issue by :user', + ], + 'reopened' => [ + 'title' => 'āš ļø Issue has been reopened āš ļø to šŸ¦Š :issue by :user', + ], +]; diff --git a/lang/de/events/gitlab/merge_request.php b/lang/de/events/gitlab/merge_request.php new file mode 100644 index 0000000..f333adb --- /dev/null +++ b/lang/de/events/gitlab/merge_request.php @@ -0,0 +1,32 @@ + 'šŸ‘„ Reviewers: ', + 'closed' => [ + 'title' => 'šŸš« Merge Request Closed - šŸ¦Š:repo by :user', + ], + 'merged' => [ + 'title' => 'āœ… Merge Request Merged - šŸ¦Š:repo by :user', + ], + 'opened' => [ + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø New Merge Request - šŸ¦Š:repo by :user', + ], + 'reopened' => [ + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø Merge Request Reopened - šŸ¦Š:repo by :user', + ], + 'approved' => [ + 'title' => 'šŸ‘ Merge Request Approved āœ… - šŸ¦Š:repo by :user', + ], + 'unapproved' => [ + 'title' => 'šŸ‘Ž Merge Request Unapproved āŒ - šŸ¦Š:repo by :user', + ], + 'approval' => [ + 'title' => 'šŸ‘ Merge Request Approval āœ… - šŸ¦Š:repo by :user', + ], + 'unapproval' => [ + 'title' => 'šŸ‘Ž Merge Request Unapproval āŒ - šŸ¦Š:repo by :user', + ], + 'update' => [ + 'title' => 'šŸ› ļø Merge Request Updated - šŸ¦Š:repo by :user', + ], +]; diff --git a/lang/de/events/gitlab/note.php b/lang/de/events/gitlab/note.php new file mode 100644 index 0000000..ad42f0b --- /dev/null +++ b/lang/de/events/gitlab/note.php @@ -0,0 +1,12 @@ + [ + 'commit' => 'šŸ’¬ New Comment on Commit - šŸ¦Š:repo by :user', + 'issue' => 'šŸ’¬ New Comment on Issue - šŸ¦Š:repo by :user', + 'merge_request' => 'šŸ’¬ New Comment on Merge Request - šŸ¦Š:repo by :user', + 'snippet' => 'šŸ’¬ New Comment on Snippet - šŸ¦Š:repo by :user', + ], + 'view_comment' => 'šŸ”— View Comment: :link', + 'snippet_comment' => 'View Comment on Snippet', +]; diff --git a/lang/de/events/gitlab/push.php b/lang/de/events/gitlab/push.php new file mode 100644 index 0000000..3c6cba5 --- /dev/null +++ b/lang/de/events/gitlab/push.php @@ -0,0 +1,9 @@ + [ + 'title' => 'šŸ‘·āš™ļø :count new :noun to šŸ¦‘:repo::branch', + 'commit' => '[:commit] :commit_message - by :commit_by', + 'pusher' => 'šŸ‘¤ Pushed by : :name', + ], +]; diff --git a/lang/de/events/gitlab/release.php b/lang/de/events/gitlab/release.php new file mode 100644 index 0000000..d50cc0c --- /dev/null +++ b/lang/de/events/gitlab/release.php @@ -0,0 +1,9 @@ + [ + 'create' => 'āœ…šŸš€ Release Created - šŸ¦Š:repo by :user', + 'update' => 'šŸ“šŸš€ Release Updated - šŸ¦Š:repo by :user', + 'delete' => 'šŸš«šŸš€ Release Deleted - šŸ¦Š:repo by :user', + ], +]; diff --git a/lang/de/events/gitlab/tag_push.php b/lang/de/events/gitlab/tag_push.php new file mode 100644 index 0000000..d405f85 --- /dev/null +++ b/lang/de/events/gitlab/tag_push.php @@ -0,0 +1,7 @@ + 'āš™ļø A new tag has been pushed to the project šŸ¦Š:repo', + 'name' => 'šŸ”– Tag Name: :tag_name', + 'pusher' => 'šŸ‘¤ Pushed by: :pusher', +]; diff --git a/lang/de/events/gitlab/wiki_page.php b/lang/de/events/gitlab/wiki_page.php new file mode 100644 index 0000000..c700d96 --- /dev/null +++ b/lang/de/events/gitlab/wiki_page.php @@ -0,0 +1,10 @@ + [ + 'create' => 'šŸ“’ Wiki Page Created - šŸ¦Š:repo by :user', + 'update' => 'šŸ“ Wiki Page Updated - šŸ¦Š:repo by :user', + 'delete' => 'šŸ—‘ Wiki Page Deleted - šŸ¦Š:repo by :user', + ], + 'name' => 'šŸ“ Page Name: :name', +]; diff --git a/lang/de/events/shared/gitlab.php b/lang/de/events/shared/gitlab.php new file mode 100644 index 0000000..ce3f29f --- /dev/null +++ b/lang/de/events/shared/gitlab.php @@ -0,0 +1,10 @@ + [ + 'title' => 'šŸ“– Content:', + ], + '_assignee' => [ + 'title' => 'šŸ™‹ Assignee: ', + ], +]; diff --git a/lang/ja/events/github/pull_request.php b/lang/ja/events/github/pull_request.php index 8fdcf31..088ccb7 100644 --- a/lang/ja/events/github/pull_request.php +++ b/lang/ja/events/github/pull_request.php @@ -3,14 +3,14 @@ return [ 'review' => 'šŸ‘„ Reviewers: ', 'closed' => [ - 'title' => ':title - šŸ¦‘:issue by :user', + 'title' => ':title - šŸ¦‘:repo by :user', 'title_merged' => 'āœ… Pull Request Merged', - 'title_closed' => 'āŒ Pull Request Closed', + 'title_closed' => 'šŸš« Pull Request Closed', ], 'opened' => [ - 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø New Pull Request - šŸ¦‘:issue by :user', + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø New Pull Request - šŸ¦‘:repo by :user', ], 'reopened' => [ - 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø Reopened Pull Request - šŸ¦‘:issue by :user', + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø Reopened Pull Request - šŸ¦‘:repo by :user', ], ]; diff --git a/lang/ja/events/github/push.php b/lang/ja/events/github/push.php index 9d65e90..e37a931 100644 --- a/lang/ja/events/github/push.php +++ b/lang/ja/events/github/push.php @@ -2,8 +2,8 @@ return [ 'default' => [ - 'title' => 'šŸ‘·āš™ļø :count new :noun to šŸ¦‘:user::branch', - 'commit' => ':commit: :commit_message - by :commit_by', - 'pushed' => 'šŸ‘¤ Pushed by : :name', + 'title' => 'šŸ‘·āš™ļø :count new :noun to šŸ¦Š:repo::branch', + 'commit' => '[:commit] :commit_message - by :commit_by', + 'pusher' => 'šŸ‘¤ Pushed by : :name', ], ]; diff --git a/lang/ja/events/github/workflow_run.php b/lang/ja/events/github/workflow_run.php index 4e895d4..f6cff4d 100644 --- a/lang/ja/events/github/workflow_run.php +++ b/lang/ja/events/github/workflow_run.php @@ -23,5 +23,5 @@ 'title' => ' Workflow Requested form šŸ¦‘:user', 'body' => 'Running workflow: šŸ’„ :name ā³', ], - 'link' => 'šŸ”— Link: :link', + 'link' => 'šŸ”— Workflow run link: :link', ]; diff --git a/lang/ja/events/gitlab/feature_flag.php b/lang/ja/events/gitlab/feature_flag.php new file mode 100644 index 0000000..4380727 --- /dev/null +++ b/lang/ja/events/gitlab/feature_flag.php @@ -0,0 +1,9 @@ + [ + 'enabled' => 'Feature Flag Enabled šŸ¦Š:flag_tag by :user_tag', + 'disabled' => 'Feature Flag Disabled šŸ¦Š:flag_tag by :user_tag', + ], + 'name' => 'Name: :flag_name', +]; diff --git a/lang/ja/events/gitlab/issues.php b/lang/ja/events/gitlab/issues.php new file mode 100644 index 0000000..a8959f2 --- /dev/null +++ b/lang/ja/events/gitlab/issues.php @@ -0,0 +1,28 @@ + 'šŸ“¢', + 'closed' => [ + 'title' => 'šŸš« Issue Closed to šŸ¦Š :issue by :user', + ], + 'edited' => [ + 'title' => 'āš ļø Issue has been edited to šŸ¦Š :issue by :user', + 'changes' => [ + 'title' => [ + 'name' => 'šŸ“– Title has been changed', + 'from' => 'šŸ“ From: :title_from', + 'to' => 'šŸ· To: :title_to', + ], + 'body' => [ + 'title' => 'šŸ“– Body has been changed', + 'message' => 'Please check the issue for more details', + ], + ], + ], + 'opened' => [ + 'title' => 'āš ļø New Issue to šŸ¦Š :issue by :user', + ], + 'reopened' => [ + 'title' => 'āš ļø Issue has been reopened āš ļø to šŸ¦Š :issue by :user', + ], +]; diff --git a/lang/ja/events/gitlab/merge_request.php b/lang/ja/events/gitlab/merge_request.php new file mode 100644 index 0000000..f333adb --- /dev/null +++ b/lang/ja/events/gitlab/merge_request.php @@ -0,0 +1,32 @@ + 'šŸ‘„ Reviewers: ', + 'closed' => [ + 'title' => 'šŸš« Merge Request Closed - šŸ¦Š:repo by :user', + ], + 'merged' => [ + 'title' => 'āœ… Merge Request Merged - šŸ¦Š:repo by :user', + ], + 'opened' => [ + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø New Merge Request - šŸ¦Š:repo by :user', + ], + 'reopened' => [ + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø Merge Request Reopened - šŸ¦Š:repo by :user', + ], + 'approved' => [ + 'title' => 'šŸ‘ Merge Request Approved āœ… - šŸ¦Š:repo by :user', + ], + 'unapproved' => [ + 'title' => 'šŸ‘Ž Merge Request Unapproved āŒ - šŸ¦Š:repo by :user', + ], + 'approval' => [ + 'title' => 'šŸ‘ Merge Request Approval āœ… - šŸ¦Š:repo by :user', + ], + 'unapproval' => [ + 'title' => 'šŸ‘Ž Merge Request Unapproval āŒ - šŸ¦Š:repo by :user', + ], + 'update' => [ + 'title' => 'šŸ› ļø Merge Request Updated - šŸ¦Š:repo by :user', + ], +]; diff --git a/lang/ja/events/gitlab/note.php b/lang/ja/events/gitlab/note.php new file mode 100644 index 0000000..ad42f0b --- /dev/null +++ b/lang/ja/events/gitlab/note.php @@ -0,0 +1,12 @@ + [ + 'commit' => 'šŸ’¬ New Comment on Commit - šŸ¦Š:repo by :user', + 'issue' => 'šŸ’¬ New Comment on Issue - šŸ¦Š:repo by :user', + 'merge_request' => 'šŸ’¬ New Comment on Merge Request - šŸ¦Š:repo by :user', + 'snippet' => 'šŸ’¬ New Comment on Snippet - šŸ¦Š:repo by :user', + ], + 'view_comment' => 'šŸ”— View Comment: :link', + 'snippet_comment' => 'View Comment on Snippet', +]; diff --git a/lang/ja/events/gitlab/push.php b/lang/ja/events/gitlab/push.php new file mode 100644 index 0000000..3c6cba5 --- /dev/null +++ b/lang/ja/events/gitlab/push.php @@ -0,0 +1,9 @@ + [ + 'title' => 'šŸ‘·āš™ļø :count new :noun to šŸ¦‘:repo::branch', + 'commit' => '[:commit] :commit_message - by :commit_by', + 'pusher' => 'šŸ‘¤ Pushed by : :name', + ], +]; diff --git a/lang/ja/events/gitlab/release.php b/lang/ja/events/gitlab/release.php new file mode 100644 index 0000000..d50cc0c --- /dev/null +++ b/lang/ja/events/gitlab/release.php @@ -0,0 +1,9 @@ + [ + 'create' => 'āœ…šŸš€ Release Created - šŸ¦Š:repo by :user', + 'update' => 'šŸ“šŸš€ Release Updated - šŸ¦Š:repo by :user', + 'delete' => 'šŸš«šŸš€ Release Deleted - šŸ¦Š:repo by :user', + ], +]; diff --git a/lang/ja/events/gitlab/tag_push.php b/lang/ja/events/gitlab/tag_push.php new file mode 100644 index 0000000..d405f85 --- /dev/null +++ b/lang/ja/events/gitlab/tag_push.php @@ -0,0 +1,7 @@ + 'āš™ļø A new tag has been pushed to the project šŸ¦Š:repo', + 'name' => 'šŸ”– Tag Name: :tag_name', + 'pusher' => 'šŸ‘¤ Pushed by: :pusher', +]; diff --git a/lang/ja/events/gitlab/wiki_page.php b/lang/ja/events/gitlab/wiki_page.php new file mode 100644 index 0000000..c700d96 --- /dev/null +++ b/lang/ja/events/gitlab/wiki_page.php @@ -0,0 +1,10 @@ + [ + 'create' => 'šŸ“’ Wiki Page Created - šŸ¦Š:repo by :user', + 'update' => 'šŸ“ Wiki Page Updated - šŸ¦Š:repo by :user', + 'delete' => 'šŸ—‘ Wiki Page Deleted - šŸ¦Š:repo by :user', + ], + 'name' => 'šŸ“ Page Name: :name', +]; diff --git a/lang/ja/events/shared/gitlab.php b/lang/ja/events/shared/gitlab.php new file mode 100644 index 0000000..ce3f29f --- /dev/null +++ b/lang/ja/events/shared/gitlab.php @@ -0,0 +1,10 @@ + [ + 'title' => 'šŸ“– Content:', + ], + '_assignee' => [ + 'title' => 'šŸ™‹ Assignee: ', + ], +]; diff --git a/lang/vi/events/github/pull_request.php b/lang/vi/events/github/pull_request.php index 8fdcf31..088ccb7 100644 --- a/lang/vi/events/github/pull_request.php +++ b/lang/vi/events/github/pull_request.php @@ -3,14 +3,14 @@ return [ 'review' => 'šŸ‘„ Reviewers: ', 'closed' => [ - 'title' => ':title - šŸ¦‘:issue by :user', + 'title' => ':title - šŸ¦‘:repo by :user', 'title_merged' => 'āœ… Pull Request Merged', - 'title_closed' => 'āŒ Pull Request Closed', + 'title_closed' => 'šŸš« Pull Request Closed', ], 'opened' => [ - 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø New Pull Request - šŸ¦‘:issue by :user', + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø New Pull Request - šŸ¦‘:repo by :user', ], 'reopened' => [ - 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø Reopened Pull Request - šŸ¦‘:issue by :user', + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø Reopened Pull Request - šŸ¦‘:repo by :user', ], ]; diff --git a/lang/vi/events/github/push.php b/lang/vi/events/github/push.php index 9d65e90..e37a931 100644 --- a/lang/vi/events/github/push.php +++ b/lang/vi/events/github/push.php @@ -2,8 +2,8 @@ return [ 'default' => [ - 'title' => 'šŸ‘·āš™ļø :count new :noun to šŸ¦‘:user::branch', - 'commit' => ':commit: :commit_message - by :commit_by', - 'pushed' => 'šŸ‘¤ Pushed by : :name', + 'title' => 'šŸ‘·āš™ļø :count new :noun to šŸ¦Š:repo::branch', + 'commit' => '[:commit] :commit_message - by :commit_by', + 'pusher' => 'šŸ‘¤ Pushed by : :name', ], ]; diff --git a/lang/vi/events/github/workflow_run.php b/lang/vi/events/github/workflow_run.php index 4e895d4..f6cff4d 100644 --- a/lang/vi/events/github/workflow_run.php +++ b/lang/vi/events/github/workflow_run.php @@ -23,5 +23,5 @@ 'title' => ' Workflow Requested form šŸ¦‘:user', 'body' => 'Running workflow: šŸ’„ :name ā³', ], - 'link' => 'šŸ”— Link: :link', + 'link' => 'šŸ”— Workflow run link: :link', ]; diff --git a/lang/vi/events/gitlab/feature_flag.php b/lang/vi/events/gitlab/feature_flag.php new file mode 100644 index 0000000..4380727 --- /dev/null +++ b/lang/vi/events/gitlab/feature_flag.php @@ -0,0 +1,9 @@ + [ + 'enabled' => 'Feature Flag Enabled šŸ¦Š:flag_tag by :user_tag', + 'disabled' => 'Feature Flag Disabled šŸ¦Š:flag_tag by :user_tag', + ], + 'name' => 'Name: :flag_name', +]; diff --git a/lang/vi/events/gitlab/issues.php b/lang/vi/events/gitlab/issues.php new file mode 100644 index 0000000..a8959f2 --- /dev/null +++ b/lang/vi/events/gitlab/issues.php @@ -0,0 +1,28 @@ + 'šŸ“¢', + 'closed' => [ + 'title' => 'šŸš« Issue Closed to šŸ¦Š :issue by :user', + ], + 'edited' => [ + 'title' => 'āš ļø Issue has been edited to šŸ¦Š :issue by :user', + 'changes' => [ + 'title' => [ + 'name' => 'šŸ“– Title has been changed', + 'from' => 'šŸ“ From: :title_from', + 'to' => 'šŸ· To: :title_to', + ], + 'body' => [ + 'title' => 'šŸ“– Body has been changed', + 'message' => 'Please check the issue for more details', + ], + ], + ], + 'opened' => [ + 'title' => 'āš ļø New Issue to šŸ¦Š :issue by :user', + ], + 'reopened' => [ + 'title' => 'āš ļø Issue has been reopened āš ļø to šŸ¦Š :issue by :user', + ], +]; diff --git a/lang/vi/events/gitlab/merge_request.php b/lang/vi/events/gitlab/merge_request.php new file mode 100644 index 0000000..f333adb --- /dev/null +++ b/lang/vi/events/gitlab/merge_request.php @@ -0,0 +1,32 @@ + 'šŸ‘„ Reviewers: ', + 'closed' => [ + 'title' => 'šŸš« Merge Request Closed - šŸ¦Š:repo by :user', + ], + 'merged' => [ + 'title' => 'āœ… Merge Request Merged - šŸ¦Š:repo by :user', + ], + 'opened' => [ + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø New Merge Request - šŸ¦Š:repo by :user', + ], + 'reopened' => [ + 'title' => 'šŸ‘·ā€ā™‚ļøšŸ› ļø Merge Request Reopened - šŸ¦Š:repo by :user', + ], + 'approved' => [ + 'title' => 'šŸ‘ Merge Request Approved āœ… - šŸ¦Š:repo by :user', + ], + 'unapproved' => [ + 'title' => 'šŸ‘Ž Merge Request Unapproved āŒ - šŸ¦Š:repo by :user', + ], + 'approval' => [ + 'title' => 'šŸ‘ Merge Request Approval āœ… - šŸ¦Š:repo by :user', + ], + 'unapproval' => [ + 'title' => 'šŸ‘Ž Merge Request Unapproval āŒ - šŸ¦Š:repo by :user', + ], + 'update' => [ + 'title' => 'šŸ› ļø Merge Request Updated - šŸ¦Š:repo by :user', + ], +]; diff --git a/lang/vi/events/gitlab/note.php b/lang/vi/events/gitlab/note.php new file mode 100644 index 0000000..ad42f0b --- /dev/null +++ b/lang/vi/events/gitlab/note.php @@ -0,0 +1,12 @@ + [ + 'commit' => 'šŸ’¬ New Comment on Commit - šŸ¦Š:repo by :user', + 'issue' => 'šŸ’¬ New Comment on Issue - šŸ¦Š:repo by :user', + 'merge_request' => 'šŸ’¬ New Comment on Merge Request - šŸ¦Š:repo by :user', + 'snippet' => 'šŸ’¬ New Comment on Snippet - šŸ¦Š:repo by :user', + ], + 'view_comment' => 'šŸ”— View Comment: :link', + 'snippet_comment' => 'View Comment on Snippet', +]; diff --git a/lang/vi/events/gitlab/push.php b/lang/vi/events/gitlab/push.php new file mode 100644 index 0000000..3c6cba5 --- /dev/null +++ b/lang/vi/events/gitlab/push.php @@ -0,0 +1,9 @@ + [ + 'title' => 'šŸ‘·āš™ļø :count new :noun to šŸ¦‘:repo::branch', + 'commit' => '[:commit] :commit_message - by :commit_by', + 'pusher' => 'šŸ‘¤ Pushed by : :name', + ], +]; diff --git a/lang/vi/events/gitlab/release.php b/lang/vi/events/gitlab/release.php new file mode 100644 index 0000000..d50cc0c --- /dev/null +++ b/lang/vi/events/gitlab/release.php @@ -0,0 +1,9 @@ + [ + 'create' => 'āœ…šŸš€ Release Created - šŸ¦Š:repo by :user', + 'update' => 'šŸ“šŸš€ Release Updated - šŸ¦Š:repo by :user', + 'delete' => 'šŸš«šŸš€ Release Deleted - šŸ¦Š:repo by :user', + ], +]; diff --git a/lang/vi/events/gitlab/tag_push.php b/lang/vi/events/gitlab/tag_push.php new file mode 100644 index 0000000..d405f85 --- /dev/null +++ b/lang/vi/events/gitlab/tag_push.php @@ -0,0 +1,7 @@ + 'āš™ļø A new tag has been pushed to the project šŸ¦Š:repo', + 'name' => 'šŸ”– Tag Name: :tag_name', + 'pusher' => 'šŸ‘¤ Pushed by: :pusher', +]; diff --git a/lang/vi/events/gitlab/wiki_page.php b/lang/vi/events/gitlab/wiki_page.php new file mode 100644 index 0000000..c700d96 --- /dev/null +++ b/lang/vi/events/gitlab/wiki_page.php @@ -0,0 +1,10 @@ + [ + 'create' => 'šŸ“’ Wiki Page Created - šŸ¦Š:repo by :user', + 'update' => 'šŸ“ Wiki Page Updated - šŸ¦Š:repo by :user', + 'delete' => 'šŸ—‘ Wiki Page Deleted - šŸ¦Š:repo by :user', + ], + 'name' => 'šŸ“ Page Name: :name', +]; diff --git a/lang/vi/events/shared/gitlab.php b/lang/vi/events/shared/gitlab.php new file mode 100644 index 0000000..ce3f29f --- /dev/null +++ b/lang/vi/events/shared/gitlab.php @@ -0,0 +1,10 @@ + [ + 'title' => 'šŸ“– Content:', + ], + '_assignee' => [ + 'title' => 'šŸ™‹ Assignee: ', + ], +];