File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
resources/views/events/github/push Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 99$ref = explode (' /' , $payload -> ref );
1010$branch = implode (' /' , array_slice ($ref , 2 ));
1111
12- $type = ' default' ;
12+ if (empty ($payload -> commits )) {
13+ return ' ' ;
14+ }
1315? >
1416
1517👷⚙️ {!! __ (' tg-notifier::events/github/push.default.title' , [
2123 ) ! !}
2224
2325@foreach ($payload -> commits as $commit )
24- @php
25- $commitId = substr ($commit -> id , - 7 );
26- @endphp
26+ @php
27+ $commitId = substr ($commit -> id , - 7 );
28+
29+ $commit -> message = $commit -> message ?? ' ' ;
30+ $commit -> message = str_replace (" \n " , ' ↩' , $commit -> message );
31+ @endphp
2732{!! __ (' tg-notifier::events/github/push.default.commit' , [
2833 ' commit' => " <a href='$commit -> url '>$commitId </a>" ,
2934 ' commit_message' => $commit -> message ,
You can’t perform that action at this time.
0 commit comments