-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from pxthinh/feature/view_template
update view and lang for issue event
- Loading branch information
Showing
11 changed files
with
135 additions
and
48 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
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 |
---|---|---|
|
@@ -4,4 +4,7 @@ | |
'_body' => [ | ||
'title' => '📖 <b>Content:</b>', | ||
], | ||
'_assignee' => [ | ||
'title' => '🙋 Assignee: ', | ||
], | ||
]; |
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,12 +1,20 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
* @var $event string | ||
*/ | ||
$message = "️🗑 <b>Issue Deleted</b> form 🦑<a href=\"{$payload->repository->html_url}\">{$payload->repository->full_name} </a> by <a href=\"{$payload->sender->html_url}\">@{$payload->sender->login}</a>\n\n"; | ||
$issue = $payload->issue; | ||
?> | ||
|
||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
{!! __('tg-notifier::events/github/issues.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 .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
{!! __('tg-notifier::events/github/issues.issue_title') !!} <b><?= $issue->title; ?></b> | ||
|
||
echo $message; | ||
@include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event')) | ||
|
||
@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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
* @var $event string | ||
*/ | ||
$message = "⚠️ <b>Issue has been edited</b> to 🦑<a href=\"{$payload->issue->html_url}\">{$payload->repository->full_name}#{$payload->issue->number}</a> by <a href=\"{$payload->issue->user->html_url}\">@{$payload->issue->user->login}</a>\n\n"; | ||
$issue = $payload->issue; | ||
?> | ||
|
||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
{!! __('tg-notifier::events/github/issues.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 .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
{!! __('tg-notifier::events/github/issues.issue_title') !!} <b><?= $issue->title; ?></b> | ||
|
||
if (isset($payload->changes->title)) { | ||
$message .= "📖 <b>Title</b> has been changed\n"; | ||
$message .= " 📝 <b>From:</b> {$payload->changes->title->from}\n"; | ||
$message .= " 🏷 <b>To:</b> {$payload->issue->title}\n"; | ||
} elseif (isset($payload->changes->body)) { | ||
$message .= "📖 <b>Body</b> has been changed\n"; | ||
$message .= "Please check the issue for more details\n"; | ||
} | ||
echo $message; | ||
@include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event')) | ||
@if(isset($payload->changes->title)) | ||
{!! __('tg-notifier::events/github/issues.edited.changes.title.name') !!} | ||
{!! __('tg-notifier::events/github/issues.edited.changes.title.from', ['title_from' => $payload->changes->title->from]) !!} | ||
{!! __('tg-notifier::events/github/issues.edited.changes.title.to', ['title_to' => $payload->issue->title]) !!} | ||
@elseif(isset($payload->changes->body)) | ||
{!! __('tg-notifier::events/github/issues.edited.changes.body.title') !!} | ||
{!! __('tg-notifier::events/github/issues.edited.changes.body.message') !!} | ||
@endif |
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,14 +1,20 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
* @var $event string | ||
*/ | ||
$message = "🔒 <b>Issue Locked</b> form 🦑<a href=\"{$payload->repository->html_url}\">{$payload->repository->full_name} </a> by <a href=\"{$payload->sender->html_url}\">@{$payload->sender->login}</a>\n\n"; | ||
$issue = $payload->issue; | ||
?> | ||
|
||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
{!! __('tg-notifier::events/github/issues.locked.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 .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
{!! __('tg-notifier::events/github/issues.issue_title') !!} <b><?= $issue->title; ?></b> | ||
|
||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
@include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event')) | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
* @var $event string | ||
*/ | ||
$message = "⚠️ <b>New Issue</b> to 🦑<a href=\"{$payload->issue->html_url}\">{$payload->repository->full_name}#{$payload->issue->number}</a> by <a href=\"{$payload->issue->user->html_url}\">@{$payload->issue->user->login}</a>\n\n"; | ||
$issue = $payload->issue; | ||
?> | ||
|
||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
{!! __('tg-notifier::events/github/issues.opened.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 .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
{!! __('tg-notifier::events/github/issues.issue_title') !!} <b><?= $issue->title; ?></b> | ||
|
||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
@include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event')) | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
* @var $event string | ||
*/ | ||
$message = "📌 <b>Issue Pinned</b> form 🦑<a href=\"{$payload->repository->html_url}\">{$payload->repository->full_name} </a> by <a href=\"{$payload->sender->html_url}\">@{$payload->sender->login}</a>\n\n"; | ||
$issue = $payload->issue; | ||
?> | ||
|
||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
{!! __('tg-notifier::events/github/issues.pinned.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 .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
{!! __('tg-notifier::events/github/issues.issue_title') !!} <b><?= $issue->title; ?></b> | ||
|
||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
@include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event')) | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
* @var $event string | ||
*/ | ||
$message = "⚠️ <b>Issue has been reopened</b> ⚠️ to 🦑<a href=\"{$payload->issue->html_url}\">{$payload->repository->full_name}#{$payload->issue->number}</a> by <a href=\"{$payload->issue->user->html_url}\">@{$payload->issue->user->login}</a>\n\n"; | ||
$issue = $payload->issue; | ||
?> | ||
|
||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
{!! __('tg-notifier::events/github/issues.reopened.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 .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
{!! __('tg-notifier::events/github/issues.issue_title') !!} <b><?= $issue->title; ?></b> | ||
|
||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
@include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event')) | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
* @var $event string | ||
*/ | ||
$message = "🔐 <b>Issue Unlocked</b> form 🦑<a href=\"{$payload->repository->html_url}\">{$payload->repository->full_name} </a> by <a href=\"{$payload->sender->html_url}\">@{$payload->sender->login}</a>\n\n"; | ||
$issue = $payload->issue; | ||
?> | ||
|
||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
{!! __('tg-notifier::events/github/issues.unlocked.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 .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
{!! __('tg-notifier::events/github/issues.issue_title') !!} <b><?= $issue->title; ?></b> | ||
|
||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
@include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event')) | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
* @var $event string | ||
*/ | ||
$message = "🔔 <b>Issue Unpinned</b> form 🦑<a href=\"{$payload->repository->html_url}\">{$payload->repository->full_name} </a> by <a href=\"{$payload->sender->html_url}\">@{$payload->sender->login}</a>\n\n"; | ||
$issue = $payload->issue; | ||
?> | ||
|
||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
{!! __('tg-notifier::events/github/issues.unpinned.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 .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
{!! __('tg-notifier::events/github/issues.issue_title') !!} <b><?= $issue->title; ?></b> | ||
|
||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
@include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event')) | ||
|
||
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