-
-
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 #41 from pxthinh/feature/add_view_template
update view template for some github events
- Loading branch information
Showing
23 changed files
with
363 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
return [ | ||
'created' => [ | ||
'title' => '💬 <b>New Label</b> ⚠️ - 🦑:repo by :user', | ||
], | ||
'deleted' => [ | ||
'title' => '🗑 <b>Label Deleted</b> - 🦑:repo by :user', | ||
], | ||
'edited' => [ | ||
'title' => '👷♂️🛠️ <b>Label has been edited</b> - 🦑:repo by :user', | ||
'changes' => [ | ||
'title' => [ | ||
'name' => '📖 <b>Title</b> has been changed', | ||
'from' => '📝 <b>From:</b> :title_from', | ||
'to' => '🏷 <b>To:</b> :title_to', | ||
], | ||
'description' => [ | ||
'name' => '📖 <b>Description</b> has been changed', | ||
'from' => '📝 <b>From:</b> :description_from', | ||
'to' => '🏷 <b>To:</b> :description_to', | ||
], | ||
], | ||
], | ||
]; |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
return [ | ||
'created' => [ | ||
'title' => '💬 <b>New Label</b> ⚠️ - 🦑:repo by :user', | ||
], | ||
'deleted' => [ | ||
'title' => '🗑 <b>Label Deleted</b> - 🦑:repo by :user', | ||
], | ||
'edited' => [ | ||
'title' => '👷♂️🛠️ <b>Label has been edited</b> - 🦑:repo by :user', | ||
'changes' => [ | ||
'title' => [ | ||
'name' => '📖 <b>Title</b> has been changed', | ||
'from' => '📝 <b>From:</b> :title_from', | ||
'to' => '🏷 <b>To:</b> :title_to', | ||
], | ||
'description' => [ | ||
'name' => '📖 <b>Description</b> has been changed', | ||
'from' => '📝 <b>From:</b> :description_from', | ||
'to' => '🏷 <b>To:</b> :description_to', | ||
], | ||
], | ||
], | ||
]; |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
return [ | ||
'created' => [ | ||
'title' => '💬 <b>New Label</b> ⚠️ - 🦑:repo by :user', | ||
], | ||
'deleted' => [ | ||
'title' => '🗑 <b>Label Deleted</b> - 🦑:repo by :user', | ||
], | ||
'edited' => [ | ||
'title' => '👷♂️🛠️ <b>Label has been edited</b> - 🦑:repo by :user', | ||
'changes' => [ | ||
'title' => [ | ||
'name' => '📖 <b>Title</b> has been changed', | ||
'from' => '📝 <b>From:</b> :title_from', | ||
'to' => '🏷 <b>To:</b> :title_to', | ||
], | ||
'description' => [ | ||
'name' => '📖 <b>Description</b> has been changed', | ||
'from' => '📝 <b>From:</b> :description_from', | ||
'to' => '🏷 <b>To:</b> :description_to', | ||
], | ||
], | ||
], | ||
]; |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
return [ | ||
'created' => [ | ||
'title' => '💬 <b>New Label</b> ⚠️ - 🦑:repo by :user', | ||
], | ||
'deleted' => [ | ||
'title' => '🗑 <b>Label Deleted</b> - 🦑:repo by :user', | ||
], | ||
'edited' => [ | ||
'title' => '👷♂️🛠️ <b>Label has been edited</b> - 🦑:repo by :user', | ||
'changes' => [ | ||
'title' => [ | ||
'name' => '📖 <b>Title</b> has been changed', | ||
'from' => '📝 <b>From:</b> :title_from', | ||
'to' => '🏷 <b>To:</b> :title_to', | ||
], | ||
'description' => [ | ||
'name' => '📖 <b>Description</b> has been changed', | ||
'from' => '📝 <b>From:</b> :description_from', | ||
'to' => '🏷 <b>To:</b> :description_to', | ||
], | ||
], | ||
], | ||
]; |
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
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
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,17 @@ | ||
<?php | ||
/** | ||
* @var $payload object | ||
*/ | ||
$label = $payload->label; | ||
$description = strlen($label->description) > 50 ? $label->description : substr($label->description, 0, 50).'...'; | ||
?> | ||
|
||
{!! __('tg-notifier::events/github/label.created.title', [ | ||
'repo' => "<a href='{$payload->repository->html_url}'>{$payload->repository->full_name}</a>", | ||
'user' => "<a href='{$payload->sender->html_url}'>@{$payload->sender->login}</a>", | ||
] | ||
) !!} | ||
|
||
📢 <b>{{ $payload->label->name }}</b> | ||
{{ $description }} |
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,13 @@ | ||
<?php | ||
/** | ||
* @var $payload object | ||
*/ | ||
?> | ||
|
||
{!! __('tg-notifier::events/github/label.deleted.title', [ | ||
'repo' => "<a href='{$payload->repository->html_url}'>{$payload->repository->full_name}</a>", | ||
'user' => "<a href='{$payload->sender->html_url}'>@{$payload->sender->login}</a>", | ||
] | ||
) !!} | ||
|
||
📢 <b>{{ $payload->label->name }}</b> |
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,34 @@ | ||
<?php | ||
/** | ||
* @var $payload object | ||
*/ | ||
$changes = $payload->changes; | ||
$label = $payload->label; | ||
$description = strlen($label->description) < 50 ? $label->description : substr($label->description, 0, 50).'...'; | ||
if (isset($changes->description->from)) { | ||
$description_changes = strlen($changes->description->from) < 50 ? $changes->description->from : substr($changes->description->from, 0, 50).'...'; | ||
} | ||
?> | ||
|
||
{!! __('tg-notifier::events/github/label.edited.title', [ | ||
'repo' => "<a href='{$payload->repository->html_url}'>{$payload->repository->full_name}</a>", | ||
'user' => "<a href='{$payload->sender->html_url}'>@{$payload->sender->login}</a>", | ||
] | ||
) !!} | ||
|
||
@if(isset($changes->name->from)) | ||
{!! __('tg-notifier::events/github/label.edited.changes.title.name') !!} | ||
{!! __('tg-notifier::events/github/label.edited.changes.title.from', ['title_from' => $payload->changes->name->from]) !!} | ||
{!! __('tg-notifier::events/github/label.edited.changes.title.to', ['title_to' => $payload->label->name]) !!} | ||
@else | ||
📢 <b>{{ $label->name }}</b> | ||
@endif | ||
|
||
@if(isset($changes->description->from)) | ||
{!! __('tg-notifier::events/github/label.edited.changes.description.name') !!} | ||
{!! __('tg-notifier::events/github/label.edited.changes.description.from', ['description_from' => $description_changes]) !!} | ||
{!! __('tg-notifier::events/github/label.edited.changes.description.to', ['description_to' => $description]) !!} | ||
@else | ||
{{ $description }} | ||
@endif |
19 changes: 19 additions & 0 deletions
19
resources/views/events/github/pull_request/assigned.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** | ||
* @var $payload object | ||
*/ | ||
$pull_request = $payload->pull_request; | ||
?> | ||
|
||
{!! __('tg-notifier::events/github/pull_request.assigned.title', [ | ||
'repo' => "<a href='$pull_request->html_url'>{$payload->repository->full_name}#$pull_request->number</a>", | ||
'user' => "<a href='{$pull_request->user->html_url}'>@{$pull_request->user->login}</a>", | ||
] | ||
) !!} | ||
|
||
{!! __('tg-notifier::events/github/pull_request.assigned.body', [ | ||
'name' => "<a href='{$payload->assignee->html_url}'>@{$payload->assignee->login}</a>", | ||
'pullRequest' => "$pull_request->title", | ||
] | ||
) !!} |
Oops, something went wrong.