forked from cslant/laravel-telegram-git-notifier
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update view and lang for issue comment event and ping
- Loading branch information
Showing
6 changed files
with
68 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
return [ | ||
'issue_comment_title' => '📢', | ||
'created' => [ | ||
'title' => '💬 <b>New Issue Comment</b> ⚠️ to 🦑 :issue by :user', | ||
], | ||
'deleted' => [ | ||
'title' => '🗑 <b>Issue Comment Deleted</b> 💬 from 🦑 :issue by :user', | ||
], | ||
'edited' => [ | ||
'title' => '📝 <b>Issue Comment Edited</b> 💬 in 🦑 :issue by :user', | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
return [ | ||
'default' => [ | ||
'title' => '♻️ <b>Connection Successful</b>', | ||
'organization' => '🏢 Organization: <b>:organization</b>', | ||
'full_name' => '📦 Repository: 🦑<b>:full_name</b>', | ||
'sender' => '👤 Sender (triggered the event): <b>:sender</b>', | ||
], | ||
]; |
18 changes: 11 additions & 7 deletions
18
resources/views/events/github/issue_comment/created.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
* @var $event string | ||
*/ | ||
$event = 'comment'; | ||
$issue = $payload->issue; | ||
?> | ||
|
||
$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"; | ||
{!! __('tg-notifier::events/github/issue_comment.created.title', [ | ||
'issue' => "<a href='$issue->html_url'>{$payload->repository->full_name}#$issue->number</a>", | ||
'user' => "<a href='{$issue->user->html_url}'>@{$issue->user->login}</a>" | ||
] | ||
) !!} | ||
|
||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
{!! __('tg-notifier::events/github/issue_comment.issue_comment_title') !!} <b><?= $issue->title; ?></b> | ||
|
||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
@include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event')) | ||
|
||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
echo $message; | ||
@include('tg-notifier::events.shared.partials.github._body', compact('payload', 'event')) |
18 changes: 11 additions & 7 deletions
18
resources/views/events/github/issue_comment/deleted.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
* @var $event string | ||
*/ | ||
$event = 'comment'; | ||
$issue = $payload->issue; | ||
?> | ||
|
||
$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"; | ||
{!! __('tg-notifier::events/github/issue_comment.deleted.title', [ | ||
'issue' => "<a href='$issue->html_url'>{$payload->repository->full_name}#$issue->number</a>", | ||
'user' => "<a href='{$issue->user->html_url}'>@{$issue->user->login}</a>" | ||
] | ||
) !!} | ||
|
||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
{!! __('tg-notifier::events/github/issue_comment.issue_comment_title') !!} <b><?= $issue->title; ?></b> | ||
|
||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
@include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event')) | ||
|
||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
echo $message; | ||
@include('tg-notifier::events.shared.partials.github._body', compact('payload', 'event')) |
18 changes: 11 additions & 7 deletions
18
resources/views/events/github/issue_comment/edited.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
* @var $event string | ||
*/ | ||
$event = 'comment'; | ||
$issue = $payload->issue; | ||
?> | ||
|
||
$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"; | ||
{!! __('tg-notifier::events/github/issue_comment.edited.title', [ | ||
'issue' => "<a href='$issue->html_url'>{$payload->repository->full_name}#$issue->number</a>", | ||
'user' => "<a href='{$issue->user->html_url}'>@{$issue->user->login}</a>" | ||
] | ||
) !!} | ||
|
||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
{!! __('tg-notifier::events/github/issue_comment.issue_comment_title') !!} <b><?= $issue->title; ?></b> | ||
|
||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
@include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event')) | ||
|
||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
echo $message; | ||
@include('tg-notifier::events.shared.partials.github._body', compact('payload', 'event')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters