File tree Expand file tree Collapse file tree 6 files changed +68
-35
lines changed
resources/views/events/github Expand file tree Collapse file tree 6 files changed +68
-35
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ return [
4+ 'issue_comment_title ' => '📢 ' ,
5+ 'created ' => [
6+ 'title ' => '💬 <b>New Issue Comment</b> ⚠️ to 🦑 :issue by :user ' ,
7+ ],
8+ 'deleted ' => [
9+ 'title ' => '🗑 <b>Issue Comment Deleted</b> 💬 from 🦑 :issue by :user ' ,
10+ ],
11+ 'edited ' => [
12+ 'title ' => '📝 <b>Issue Comment Edited</b> 💬 in 🦑 :issue by :user ' ,
13+ ],
14+ ];
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ return [
4+ 'default ' => [
5+ 'title ' => '♻️ <b>Connection Successful</b> ' ,
6+ 'organization ' => '🏢 Organization: <b>:organization</b> ' ,
7+ 'full_name ' => '📦 Repository: 🦑<b>:full_name</b> ' ,
8+ 'sender ' => '👤 Sender (triggered the event): <b>:sender</b> ' ,
9+ ],
10+ ];
Original file line number Diff line number Diff line change 11<?php
22/**
33 * @var $payload mixed
4+ * @var $event string
45 */
56
6- $event = ' comment' ;
7+ $issue = $payload -> issue ;
8+ ? >
79
8- $message = " 💬 <b>New Issue Comment</b> ⚠️ to 🦑<a href=\" {$payload -> issue -> html_url }\" >{$payload -> repository -> full_name }#{$payload -> issue -> number }</a> by <a href=\" {$payload -> comment -> user -> html_url }\" >@{$payload -> comment -> user -> login }</a>\n\n " ;
10+ {!! __ (' tg-notifier::events/github/issue_comment.created.title' , [
11+ ' issue' => " <a href='$issue -> html_url '>{$payload -> repository -> full_name }#$issue -> number </a>" ,
12+ ' user' => " <a href='{$issue -> user -> html_url }'>@{$issue -> user -> login }</a>"
13+ ]
14+ ) ! !}
915
10- $message .= " 📢 <b>{ $payload -> issue -> title } </b>\n " ;
16+ {!! __ ( ' tg-notifier::events/github/issue_comment.issue_comment_title ' ) ! !} <b ><?= $ issue-> title ; ? > </b >
1117
12- $message .= require __DIR__ . ' /../../ shared/ partials/ github/_assignees.php ' ;
18+ @include ( ' tg-notifier::events. shared. partials. github._assignees ' , compact ( ' payload ' , ' event ' ) )
1319
14- $message .= require __DIR__ . ' /../../shared/partials/github/_body.php' ;
15-
16- echo $message ;
20+ @include (' tg-notifier::events.shared.partials.github._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
6- $event = ' comment' ;
7+ $issue = $payload -> issue ;
8+ ? >
79
8- $message = " ️🗑 <b>Issue Comment Deleted</b> 💬 from 🦑<a href=\" {$payload -> repository -> html_url }\" >{$payload -> repository -> full_name } </a> by <a href=\" {$payload -> sender -> html_url }\" >@{$payload -> sender -> login }</a>\n\n " ;
10+ {!! __ (' tg-notifier::events/github/issue_comment.deleted.title' , [
11+ ' issue' => " <a href='$issue -> html_url '>{$payload -> repository -> full_name }#$issue -> number </a>" ,
12+ ' user' => " <a href='{$issue -> user -> html_url }'>@{$issue -> user -> login }</a>"
13+ ]
14+ ) ! !}
915
10- $message .= " 📢 <b>{ $payload -> issue -> title } </b>\n " ;
16+ {!! __ ( ' tg-notifier::events/github/issue_comment.issue_comment_title ' ) ! !} <b ><?= $ issue-> title ; ? > </b >
1117
12- $message .= require __DIR__ . ' /../../ shared/ partials/ github/_assignees.php ' ;
18+ @include ( ' tg-notifier::events. shared. partials. github._assignees ' , compact ( ' payload ' , ' event ' ) )
1319
14- $message .= require __DIR__ . ' /../../shared/partials/github/_body.php' ;
15-
16- echo $message ;
20+ @include (' tg-notifier::events.shared.partials.github._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
6- $event = ' comment' ;
7+ $issue = $payload -> issue ;
8+ ? >
79
8- $message = " ️📝 <b>Issue Comment Edited</b> 💬 in 🦑<a href=\" {$payload -> issue -> html_url }\" >{$payload -> repository -> full_name }#{$payload -> issue -> number }</a> by <a href=\" {$payload -> comment -> user -> html_url }\" >@{$payload -> comment -> user -> login }</a>\n\n " ;
10+ {!! __ (' tg-notifier::events/github/issue_comment.edited.title' , [
11+ ' issue' => " <a href='$issue -> html_url '>{$payload -> repository -> full_name }#$issue -> number </a>" ,
12+ ' user' => " <a href='{$issue -> user -> html_url }'>@{$issue -> user -> login }</a>"
13+ ]
14+ ) ! !}
915
10- $message .= " 📢 <b>{ $payload -> issue -> title } </b>\n " ;
16+ {!! __ ( ' tg-notifier::events/github/issue_comment.issue_comment_title ' ) ! !} <b ><?= $ issue-> title ; ? > </b >
1117
12- $message .= require __DIR__ . ' /../../ shared/ partials/ github/_assignees.php ' ;
18+ @include ( ' tg-notifier::events. shared. partials. github._assignees ' , compact ( ' payload ' , ' event ' ) )
1319
14- $message .= require __DIR__ . ' /../../shared/partials/github/_body.php' ;
15-
16- echo $message ;
20+ @include (' tg-notifier::events.shared.partials.github._body' , compact (' payload' , ' event' ) )
Original file line number Diff line number Diff line change 22/**
33 * @var $payload mixed
44 */
5+ ? >
56
6- $message = " ♻️ <b>Connection Successful</b> \n\n " ;
7+ {!! __ ( ' tg-notifier::events/github/ping.default.title ' ) ! !}
78
8- if (isset ($payload -> organization )) {
9- $message .= " 🏢 Organization: <b>{$payload -> organization -> login }</b>\n " ;
10- }
11-
12- if (isset ($payload -> repository )) {
13- $message .= " 📦 Repository: 🦑<b>{$payload -> repository -> full_name }</b>\n " ;
14- }
15-
16- if (isset ($payload -> sender )) {
17- $message .= " 👤 Sender (triggered the event): <b>{$payload -> sender -> login }</b>\n " ;
18- }
19-
20- echo $message ;
9+ @if (isset ($payload -> organization ) )
10+ {!! __ (' tg-notifier::events/github/ping.default.organization' , [' organization' => $payload -> organization -> login ]) ! !}
11+ @endif
12+ @if (isset ($payload -> repository ) )
13+ {!! __ (' tg-notifier::events/github/ping.default.full_name' , [' full_name' => $payload -> repository -> full_name ]) ! !}
14+ @endif
15+ @if (isset ($payload -> sender ) )
16+ {!! __ (' tg-notifier::events/github/ping.default.sender' , [' sender' => $payload -> sender -> login ]) ! !}
17+ @endif
You can’t perform that action at this time.
0 commit comments