File tree Expand file tree Collapse file tree 4 files changed +32
-11
lines changed
Expand file tree Collapse file tree 4 files changed +32
-11
lines changed Original file line number Diff line number Diff line change 22
33return [
44 'default ' => [
5- 'title ' => '👷⚙️ <b>:count</b> new :noun to 🦑 <b>:user :<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> ' ,
7- 'pushed ' => '👤 Pushed by : <b>:name</b> ' ,
7+ 'pusher ' => '👤 Pushed by : <b>:name</b> ' ,
88 ],
99];
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ return [
4+ 'default ' => [
5+ 'title ' => '👷⚙️ <b>:count</b> new :noun to 🦑<b>:repo:<code>:branch</code></b> ' ,
6+ 'commit ' => '[:commit] :commit_message - by <i>:commit_by</i> ' ,
7+ 'pusher ' => '👤 Pushed by : <b>:name</b> ' ,
8+ ],
9+ ];
Original file line number Diff line number Diff line change 1313{!! __ (' tg-notifier::events/github/push.default.title' , [
1414 ' count' => $count ,
1515 ' noun' => $noun ,
16- ' user ' => $payload -> repository -> full_name ,
16+ ' repo ' => $payload -> repository -> full_name ,
1717 ' branch' => $branch ,
1818 ]
1919 ) ! !}
3030) ! !}
3131@endforeach
3232
33- {!! __ (' tg-notifier::events/github/push.default.pushed ' , [' name' => $payload -> pusher -> name ]) ! !}
33+ {!! __ (' tg-notifier::events/github/push.default.pusher ' , [' name' => $payload -> pusher -> name ]) ! !}
Original file line number Diff line number Diff line change 88
99$ref = explode (' /' , $payload -> ref );
1010$branch = implode (' /' , array_slice ($ref , 2 ));
11+ ? >
1112
12- $message = " ⚙️ <b>{$count }</b> new {$noun } to 🦊<b>{$payload -> project -> path_with_namespace }:<code>{$branch }</code></b>\n\n " ;
13+ {!! __ (' tg-notifier::events/gitlab/push.default.title' , [
14+ ' count' => $count ,
15+ ' noun' => $noun ,
16+ ' repo' => $payload -> project -> path_with_namespace ,
17+ ' branch' => $branch ,
18+ ]
19+ ) ! !}
1320
14- foreach ($payload -> commits as $commit ) {
21+ @foreach ($payload -> commits as $commit )
22+ @php
1523 $commitId = substr ($commit -> id , - 7 );
16- $message .= " <a href=\" {$commit -> url }\" >{$commitId }</a>: {$commit -> message } - by <i>{$commit -> author -> name }</i>\n " ;
17- }
24+ @endphp
25+ {!! __ (' tg-notifier::events/gitlab/push.default.commit' , [
26+ ' commit' => " <a href='$commit -> url '>$commitId </a>" ,
27+ ' commit_message' => $commit -> message ,
28+ ' commit_by' => $commit -> author -> name ,
29+ ]
30+ ) ! !}
31+ @endforeach
1832
19- $message .= " \n 👤 Pushed by : <b>{$payload -> user_name }</b>\n " ;
20-
21- echo $message ;
33+ {!! __ (' tg-notifier::events/gitlab/push.default.pusher' , [' name' => $payload -> user_name ]) ! !}
You can’t perform that action at this time.
0 commit comments