File tree Expand file tree Collapse file tree 11 files changed +29
-17
lines changed
resources/views/events/github Expand file tree Collapse file tree 11 files changed +29
-17
lines changed Original file line number Diff line number Diff line change 44 'by ' => 'by ' ,
55 'unknown_callback ' => 'Unknown Callback. Something went wrong! ' ,
66 'invalid_request ' => 'Invalid Request! ' ,
7+ 'branch ' => 'Branch ' ,
78];
Original file line number Diff line number Diff line change 22
33return [
44 'default ' => [
5- 'title ' => '👷⚙️ <b>:count</b> new :noun to 🦊 <b>:repo:<code>:branch</code></b> ' ,
5+ 'title ' => '<b>:count</b> new :noun to <b>:repo:<code>:branch</code></b> ' ,
66 'commit ' => '[:commit] :commit_message - by <i>:commit_by</i> ' ,
77 'pusher ' => 'Pushed by ' ,
88 ],
Original file line number Diff line number Diff line change 44 'by ' => 'by ' ,
55 'unknown_callback ' => 'Unknown Callback. Something went wrong! ' ,
66 'invalid_request ' => 'Invalid Request! ' ,
7+ 'branch ' => 'Branch ' ,
78];
Original file line number Diff line number Diff line change 22
33return [
44 'default ' => [
5- 'title ' => '👷⚙️ <b>:count</b> new :noun to 🦊 <b>:repo:<code>:branch</code></b> ' ,
5+ 'title ' => '<b>:count</b> new :noun to <b>:repo:<code>:branch</code></b> ' ,
66 'commit ' => '[:commit] :commit_message - by <i>:commit_by</i> ' ,
77 'pusher ' => 'Pushed by ' ,
88 ],
Original file line number Diff line number Diff line change 44 'by ' => 'by ' ,
55 'unknown_callback ' => 'Unknown Callback. Something went wrong! ' ,
66 'invalid_request ' => 'Invalid Request! ' ,
7+ 'branch ' => 'Branch ' ,
78];
Original file line number Diff line number Diff line change 22
33return [
44 'default ' => [
5- 'title ' => '👷⚙️ <b>:count</b> new :noun to 🦊 <b>:repo:<code>:branch</code></b> ' ,
5+ 'title ' => '<b>:count</b> new :noun to <b>:repo:<code>:branch</code></b> ' ,
66 'commit ' => '[:commit] :commit_message - by <i>:commit_by</i> ' ,
77 'pusher ' => 'Pushed by ' ,
88 ],
Original file line number Diff line number Diff line change 11<?php
22
33return [
4- 'by ' => 'bởi ' ,
5- 'unknown_callback ' => 'Callback không xác định. Đã xảy ra lỗi! ' ,
6- 'invalid_request ' => 'Yêu cầu không hợp lệ! ' ,
4+ 'by ' => 'by ' ,
5+ 'unknown_callback ' => 'Unknown Callback. Something went wrong! ' ,
6+ 'invalid_request ' => 'Invalid Request! ' ,
7+ 'branch ' => 'Branch ' ,
78];
Original file line number Diff line number Diff line change 22
33return [
44 'default ' => [
5- 'title ' => '👷⚙️ <b>:count</b> new :noun to 🦊 <b>:repo:<code>:branch</code></b> ' ,
5+ 'title ' => '<b>:count</b> new :noun to <b>:repo:<code>:branch</code></b> ' ,
66 'commit ' => '[:commit] :commit_message - by <i>:commit_by</i> ' ,
77 'pusher ' => 'Pushed by ' ,
88 ],
Original file line number Diff line number Diff line change 88
99$ref = explode (' /' , $payload -> ref );
1010$branch = implode (' /' , array_slice ($ref , 2 ));
11+
12+ if (empty ($payload -> commits )) {
13+ return ' ' ;
14+ }
1115? >
1216
13- {!! __ (' tg-notifier::events/github/push.default.title' , [
17+ 👷⚙️ {!! __ (' tg-notifier::events/github/push.default.title' , [
1418 ' count' => $count ,
1519 ' noun' => $noun ,
16- ' repo' => $payload -> repository -> full_name ,
20+ ' repo' => " 🦑<a href='{ $payload -> repository -> html_url }'>{ $payload -> repository -> full_name }</a> " ,
1721 ' branch' => $branch ,
1822 ]
1923 ) ! !}
2024
2125@foreach ($payload -> commits as $commit )
2226@php
2327 $commitId = substr ($commit -> id , - 7 );
28+
29+ $commit -> message = $commit -> message ?? ' ' ;
30+ $commit -> message = explode (" \n " , $commit -> message )[0 ];
2431@endphp
2532{!! __ (' tg-notifier::events/github/push.default.commit' , [
2633 ' commit' => " <a href='$commit -> url '>$commitId </a>" ,
3037) ! !}
3138@endforeach
3239
40+ 🌲 {{ __ (' tg-notifier::app.branch' ) } } : <code >{{ $branch } } </code >
3341👤 {!! __ (' tg-notifier::events/github/push.default.pusher' ) ! !} : <code >{{ $payload -> pusher -> name } } </code >
Original file line number Diff line number Diff line change 2222{{ $icon } } {!! __ (" tg-notifier::events/github/workflow_job.completed.$status " , [' repo' => " 🦑<a href='{$payload -> repository -> html_url }'>{$payload -> repository -> full_name }</a>" ]) ! !}
2323
2424🚀 {!! __ (' tg-notifier::events/github/workflow_job.name' ) ! !} : {{ $icon } } <code >{{ $payload -> workflow_job -> name } } </code > {{ $last } }
25- 🚨 {!! __ (' tg-notifier::events/github/workflow_job.status.title' ) ! !} : <code >{!! __ (' tg-notifier::events/github/workflow_job.status.' . $status ) ! !} </code > 🕓 <code >{{ $allSeconds } } s</code >
25+ 🚨 {!! __ (' tg-notifier::events/github/workflow_job.status.title' ) ! !} : <code >{!! __ (' tg-notifier::events/github/workflow_job.status.' . $status ) ! !} </code > ⏱️ <code >{{ $allSeconds } } s</code >
2626🔗 {!! __ (' tg-notifier::events/github/workflow_job.link' , [' link' => " <a href='{$payload -> workflow_job -> html_url }'>{$payload -> workflow_job -> workflow_name }</a>" ]) ! !}
You can’t perform that action at this time.
0 commit comments