File tree Expand file tree Collapse file tree 9 files changed +45
-17
lines changed
Expand file tree Collapse file tree 9 files changed +45
-17
lines changed Original file line number Diff line number Diff line change 33return [
44 'default ' => [
55 'title ' => '👷⚙️ <b>:count</b> new :noun to 🦑<b>:user:<code>:branch</code></b> ' ,
6- 'commit ' => ':commit: :commit_message - by <i>:commit_name </i> ' ,
6+ 'commit ' => ':commit: :commit_message - by <i>:commit_by </i> ' ,
77 'pushed ' => '👤 Pushed by : <b>:name</b> ' ,
88 ],
99];
Original file line number Diff line number Diff line change 33return [
44 'default ' => [
55 'title ' => '👷⚙️ <b>:count</b> new :noun to 🦑<b>:user:<code>:branch</code></b> ' ,
6- 'commit ' => ':commit: :commit_message - by <i>:commit_name </i> ' ,
6+ 'commit ' => '[ :commit] :commit_message - by <i>:commit_by </i> ' ,
77 'pushed ' => '👤 Pushed by : <b>:name</b> ' ,
88 ],
99];
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ return [
4+ 'title ' => [
5+ 'enabled ' => '<b>Feature Flag Enabled</b> 🦊:flag_tag by :user_tag ' ,
6+ 'disabled ' => '<b>Feature Flag Disabled</b> 🦊:flag_tag by :user_tag ' ,
7+ ],
8+ 'name ' => 'Name: <b>:flag_name</b> ' ,
9+ ];
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ return [
4+ '_body ' => [
5+ 'title ' => '📖 <b>Content:</b> ' ,
6+ ],
7+ '_assignee ' => [
8+ 'title ' => '🙋 Assignee: ' ,
9+ ],
10+ ];
Original file line number Diff line number Diff line change 33return [
44 'default ' => [
55 'title ' => '👷⚙️ <b>:count</b> new :noun to 🦑<b>:user:<code>:branch</code></b> ' ,
6- 'commit ' => ':commit: :commit_message - by <i>:commit_name </i> ' ,
6+ 'commit ' => ':commit: :commit_message - by <i>:commit_by </i> ' ,
77 'pushed ' => '👤 Pushed by : <b>:name</b> ' ,
88 ],
99];
Original file line number Diff line number Diff line change 33return [
44 'default ' => [
55 'title ' => '👷⚙️ <b>:count</b> new :noun to 🦑<b>:user:<code>:branch</code></b> ' ,
6- 'commit ' => ':commit: :commit_message - by <i>:commit_name </i> ' ,
6+ 'commit ' => ':commit: :commit_message - by <i>:commit_by </i> ' ,
77 'pushed ' => '👤 Pushed by : <b>:name</b> ' ,
88 ],
99];
Original file line number Diff line number Diff line change 2525{!! __ (' tg-notifier::events/github/push.default.commit' , [
2626 ' commit' => " <a href='$commit -> url '>$commitId </a>" ,
2727 ' commit_message' => $commit -> message ,
28- ' commit_name ' => $commit -> author -> name ,
28+ ' commit_by ' => $commit -> author -> name ,
2929 ]
3030) ! !}
3131@endforeach
Original file line number Diff line number Diff line change 11<?php
22/**
33 * @var $payload mixed
4+ * @var $event string
45 */
56
7+ $flagUrl = $payload -> project -> web_url . " /-/feature_flags/" . $payload -> object_attributes -> id ;
8+ $flatTag = " <a href=\" {$flagUrl }\" >{$payload -> project -> path_with_namespace }#{$payload -> object_attributes -> name }</a>" ;
9+ $userTag = " <a href=\" {$payload -> user_url }\" >{$payload -> user -> name }</a>" ;
10+
611if ($payload -> object_attributes -> active ) {
7- $active = " Enabled " ;
12+ $active = " enabled " ;
813 $icon = " 🚩" ;
914} else {
10- $active = " Disabled " ;
15+ $active = " disabled " ;
1116 $icon = " 🏴" ;
1217}
18+ ? >
1319
14- $flagUrl = $payload -> project -> web_url . " /-/feature_flags/" . $payload -> object_attributes -> id ;
15-
16- $message = " {$icon } <b>Feature Flag {$active }</b> - 🦊<a href=\" {$flagUrl }\" >{$payload -> project -> path_with_namespace }#{$payload -> object_attributes -> name }</a> by <a href=\" {$payload -> user_url }\" >{$payload -> user -> name }</a>\n\n " ;
17-
18- $message .= " {$icon } Name: <b>{$payload -> object_attributes -> name }</b> \n\n " ;
20+ {!! $icon ! !} {!! __ (' tg-notifier::events/gitlab/feature_flag.title' . $active , [
21+ ' flag_tag' => $flagTag ,
22+ ' user_tag' => $userTag ,
23+ ]) ! !}
1924
20- $message .= require __DIR__ . ' /../../shared/partials/ gitlab/_body.php ' ;
25+ {!! $icon ! !} {!! __ ( ' tg-notifier::events/ gitlab/feature_flag.name ' , [ ' flag_name ' => $payload -> object_attributes -> name ]) ! !}
2126
22- echo $message ;
27+ @include ( ' tg-notifier::events.shared.partials.gitlab._body ' , compact ( ' payload ' , ' event ' ) )
Original file line number Diff line number Diff line change 11<?php
22/**
33 * @var $payload mixed
4+ * @var $event string
45 */
56
7+ $html = ' ' ;
68if (isset ($event ) && isset ($payload )) {
79 if (! empty ($payload -> object_attributes -> description )) {
810 $body = $payload -> object_attributes -> description ;
2123 $body = substr ($body , 0 , 50 ) . ' ...' ;
2224 }
2325
24- return " 📖 <b>Content:</b>\n {$body }" ;
26+ $html = __ (' tg-notifier::events/shared/gitlab._body.title' , [' body' => $body ])
27+ . " \n "
28+ . htmlentities ($body );
2529}
26-
27- return ' ' ;
30+ ? >
31+ {!! $html ! !}
You can’t perform that action at this time.
0 commit comments