diff --git a/lang/de/events/gitlab/push.php b/lang/de/events/gitlab/push.php
index 9e512a5..9f66220 100644
--- a/lang/de/events/gitlab/push.php
+++ b/lang/de/events/gitlab/push.php
@@ -1,9 +1,8 @@
[
- 'title' => ':count new :noun to :repo::branch
',
- 'commit' => '[:commit] :commit_message - by :commit_by',
- 'pusher' => '👤 Pushed by : :name',
- ],
+ 'title' => ':count new :noun to :repo::branch
',
+ 'commit' => '[:commit] :commit_message - by :commit_by',
+ 'pusher' => 'Pushed by : :name',
+ 'new_branch_title' => 'A new branch has been pushed to the project :repo',
];
diff --git a/lang/en/events/gitlab/push.php b/lang/en/events/gitlab/push.php
index 9e512a5..9f66220 100644
--- a/lang/en/events/gitlab/push.php
+++ b/lang/en/events/gitlab/push.php
@@ -1,9 +1,8 @@
[
- 'title' => ':count new :noun to :repo::branch
',
- 'commit' => '[:commit] :commit_message - by :commit_by',
- 'pusher' => '👤 Pushed by : :name',
- ],
+ 'title' => ':count new :noun to :repo::branch
',
+ 'commit' => '[:commit] :commit_message - by :commit_by',
+ 'pusher' => 'Pushed by : :name',
+ 'new_branch_title' => 'A new branch has been pushed to the project :repo',
];
diff --git a/lang/ja/events/gitlab/push.php b/lang/ja/events/gitlab/push.php
index 9e512a5..9f66220 100644
--- a/lang/ja/events/gitlab/push.php
+++ b/lang/ja/events/gitlab/push.php
@@ -1,9 +1,8 @@
[
- 'title' => ':count new :noun to :repo::branch
',
- 'commit' => '[:commit] :commit_message - by :commit_by',
- 'pusher' => '👤 Pushed by : :name',
- ],
+ 'title' => ':count new :noun to :repo::branch
',
+ 'commit' => '[:commit] :commit_message - by :commit_by',
+ 'pusher' => 'Pushed by : :name',
+ 'new_branch_title' => 'A new branch has been pushed to the project :repo',
];
diff --git a/lang/vi/app.php b/lang/vi/app.php
index cb3d035..48559dc 100644
--- a/lang/vi/app.php
+++ b/lang/vi/app.php
@@ -1,8 +1,8 @@
'by',
- 'unknown_callback' => 'Unknown Callback. Something went wrong!',
- 'invalid_request' => 'Invalid Request!',
- 'branch' => 'Branch',
+ 'by' => 'bởi',
+ 'unknown_callback' => 'Không rõ Callback. Đã xảy ra lỗi!',
+ 'invalid_request' => 'Yêu cầu không hợp lệ!',
+ 'branch' => 'Tên nhánh',
];
diff --git a/lang/vi/events/gitlab/push.php b/lang/vi/events/gitlab/push.php
index 8ebfd2b..6cffcdc 100644
--- a/lang/vi/events/gitlab/push.php
+++ b/lang/vi/events/gitlab/push.php
@@ -1,9 +1,8 @@
[
- 'title' => ':count :noun mới trong :repo::branch
',
- 'commit' => '[:commit] :commit_message - bởi :commit_by',
- 'pusher' => '👤 Đẩy lên bởi: : :name',
- ],
+ 'title' => ':count :noun mới trong :repo::branch
',
+ 'commit' => '[:commit] :commit_message - bởi :commit_by',
+ 'pusher' => 'Đẩy lên bởi: : :name',
+ 'new_branch_title' => 'Một nhánh mới đã được tạo trong dự án :repo',
];
diff --git a/resources/views/events/gitlab/push/default.blade.php b/resources/views/events/gitlab/push/default.blade.php
index c43b4f6..9298c2b 100644
--- a/resources/views/events/gitlab/push/default.blade.php
+++ b/resources/views/events/gitlab/push/default.blade.php
@@ -8,24 +8,35 @@
$ref = explode('/', $payload->ref);
$branch = implode('/', array_slice($ref, 2));
+$repo = "🦊{$payload->project->path_with_namespace}";
?>
-
-👷⚙️ {!! __('tg-notifier::events/gitlab/push.default.title', [
+@if(empty($payload->commits)) {{-- New branch created --}}
+🎊 {!! __('tg-notifier::events/gitlab/push.new_branch_title', [
+ 'repo' => $repo,
+]) !!}
+@else
+👷⚙️ {!! __('tg-notifier::events/gitlab/push.title', [
'count' => $count,
'noun' => $noun,
- 'repo' => "🦑{$payload->project->path_with_namespace}",
+ 'repo' => $repo,
'branch' => $branch,
]) !!}
@foreach($payload->commits as $commit)
@php
$commitId = substr($commit->id, -7);
+
+ $commit->message = $commit->message ?? '';
+ $commit->message = explode("\n", $commit->message)[0];
@endphp
-{!! __('tg-notifier::events/gitlab/push.default.commit', [
+{!! __('tg-notifier::events/gitlab/push.commit', [
'commit' => "$commitId",
'commit_message' => $commit->message,
'commit_by' => $commit->author->name,
]) !!}
+
@endforeach
+@endif
-{!! __('tg-notifier::events/gitlab/push.default.pusher', ['name' => $payload->user_name]) !!}
+🌲 {{ __('tg-notifier::app.branch') }}: {{ $branch }}
+👤 {!! __('tg-notifier::events/gitlab/push.pusher', ['name' => $payload->user_name]) !!}