-
-
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 #21 from tanhongit/feature/view_template
init view template
- Loading branch information
Showing
63 changed files
with
925 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$event = 'comment'; | ||
$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"; | ||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
echo $message; |
16 changes: 16 additions & 0 deletions
16
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$event = 'comment'; | ||
$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"; | ||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
echo $message; |
16 changes: 16 additions & 0 deletions
16
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$event = 'comment'; | ||
$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"; | ||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
echo $message; |
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,12 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$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"; | ||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
echo $message; |
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,21 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$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"; | ||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
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; |
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 | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$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"; | ||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
echo $message; |
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 | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$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"; | ||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
echo $message; |
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 | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$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"; | ||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
echo $message; |
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 | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$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"; | ||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
echo $message; |
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 | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$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"; | ||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
echo $message; |
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 | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$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"; | ||
$message .= "📢 <b>{$payload->issue->title}</b>\n"; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
echo $message; |
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,20 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$message = "♻️ <b>Connection Successful</b>\n\n"; | ||
if (isset($payload->organization)) { | ||
$message .= "🏢 Organization: <b>{$payload->organization->login}</b>\n"; | ||
} | ||
if (isset($payload->repository)) { | ||
$message .= "📦 Repository: 🦑<b>{$payload->repository->full_name}</b>\n"; | ||
} | ||
if (isset($payload->sender)) { | ||
$message .= "👤 Sender (triggered the event): <b>{$payload->sender->login}</b>\n"; | ||
} | ||
echo $message; |
23 changes: 23 additions & 0 deletions
23
resources/views/events/github/pull_request/closed.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,23 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$message = '✅ <b>Pull Request Merged'; | ||
if (!isset($payload->pull_request->merged) || $payload->pull_request->merged !== true) { | ||
$message = '❌ <b>Pull Request Closed'; | ||
} | ||
$message = $message . "</b> - 🦑<a href=\"{$payload->pull_request->html_url}\">{$payload->repository->full_name}#{$payload->pull_request->number}</a> by <a href=\"{$payload->pull_request->user->html_url}\">@{$payload->pull_request->user->login}</a>\n\n"; | ||
$message .= "🛠 <b>{$payload->pull_request->title}</b> \n\n"; | ||
$message .= "🌳 {$payload->pull_request->head->ref} -> {$payload->pull_request->base->ref} 🎯 \n"; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
$message .= require __DIR__ . '/partials/_reviewers.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
echo $message; |
18 changes: 18 additions & 0 deletions
18
resources/views/events/github/pull_request/opened.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,18 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$message = "👷♂️🛠️ <b>New Pull Request</b> - 🦑<a href=\"{$payload->pull_request->html_url}\">{$payload->repository->full_name}#{$payload->pull_request->number}</a> create by <a href=\"{$payload->pull_request->user->html_url}\">@{$payload->pull_request->user->login}</a>\n\n"; | ||
$message .= "🛠 <b>{$payload->pull_request->title}</b> \n\n"; | ||
$message .= "🌳 {$payload->pull_request->head->ref} -> {$payload->pull_request->base->ref} 🎯 \n"; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
$message .= require __DIR__ . '/partials/_reviewers.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
echo $message; |
16 changes: 16 additions & 0 deletions
16
resources/views/events/github/pull_request/partials/_reviewers.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,16 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$textReviewers = ''; | ||
if (isset($payload->pull_request->requested_reviewers) && count($payload->pull_request->requested_reviewers) > 0) { | ||
$reviewers = []; | ||
foreach ($payload->pull_request->requested_reviewers as $reviewer) { | ||
$reviewers[] = "<b>{$reviewer->login}</b>"; | ||
} | ||
$textReviewers .= "👥 Reviewers: " . implode(', ', $reviewers) . "\n"; | ||
} | ||
return $textReviewers; |
18 changes: 18 additions & 0 deletions
18
resources/views/events/github/pull_request/reopened.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,18 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$message = "👷♂️🛠️ <b>Reopened Pull Request</b> - 🦑<a href=\"{$payload->pull_request->html_url}\">{$payload->repository->full_name}#{$payload->pull_request->number}</a> by <a href=\"{$payload->pull_request->user->html_url}\">@{$payload->pull_request->user->login}</a>\n\n"; | ||
$message .= "🛠 <b>{$payload->pull_request->title}</b> \n\n"; | ||
$message .= "🌳 {$payload->pull_request->head->ref} -> {$payload->pull_request->base->ref} 🎯 \n"; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_assignees.php'; | ||
$message .= require __DIR__ . '/partials/_reviewers.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/github/_body.php'; | ||
echo $message; |
12 changes: 12 additions & 0 deletions
12
resources/views/events/github/pull_request_review/dismissed.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,12 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$message = "👷♂️🛠️ <b>Dismissed Pull Request Review Comment</b> 💬 - 🦑<a href=\"{$payload->pull_request->html_url}\">{$payload->repository->full_name}#{$payload->pull_request->number}</a> by <a href=\"{$payload->review->user->html_url}\">@{$payload->review->user->login}</a>\n\n"; | ||
$message .= "🛠 <b>{$payload->pull_request->title}</b> \n\n"; | ||
$message .= "🔗 Link: <a href=\"{$payload->review->html_url}\">{$payload->review->html_url}</a>\n\n"; | ||
echo $message; |
12 changes: 12 additions & 0 deletions
12
resources/views/events/github/pull_request_review/submitted.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,12 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$message = "👷♂️🛠️ <b>New Pull Request Review Comment</b> 💬 - 🦑<a href=\"{$payload->pull_request->html_url}\">{$payload->repository->full_name}#{$payload->pull_request->number}</a> by <a href=\"{$payload->review->user->html_url}\">@{$payload->review->user->login}</a>\n\n"; | ||
$message .= "🛠 <b>{$payload->pull_request->title}</b> \n\n"; | ||
$message .= "🔗 Link: <a href=\"{$payload->review->html_url}\">{$payload->review->html_url}</a>\n\n"; | ||
echo $message; |
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,21 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$count = count($payload->commits); | ||
$noun = ($count > 1) ? "commits" : "commit"; | ||
$ref = explode('/', $payload->ref); | ||
$branch = implode('/', array_slice($ref, 2)); | ||
$message = "⚙️ <b>{$count}</b> new {$noun} to 🦑<b>{$payload->repository->full_name}:<code>{$branch}</code></b>\n\n"; | ||
foreach ($payload->commits as $commit) { | ||
$commitId = substr($commit->id, -7); | ||
$message .= "<a href=\"{$commit->url}\">{$commitId}</a>: {$commit->message} - by <i>{$commit->author->name}</i>\n"; | ||
} | ||
$message .= "\n👤 Pushed by : <b>{$payload->pusher->name}</b>\n"; | ||
echo $message; |
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 | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$message = "🎉 <b>Watch Started</b> form 🦑<a href=\"{$payload->repository->html_url}\">{$payload->repository->full_name}</a>\n\n"; | ||
$message .= "👤 Watcher: <b>{$payload->sender->login}</b> 👀\n\n"; | ||
echo $message; |
18 changes: 18 additions & 0 deletions
18
resources/views/events/github/workflow_job/completed.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,18 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
if ($payload->workflow_job->conclusion === 'success') { | ||
$message = "🎉 <b>Action Completed</b> form 🦑<a href=\"{$payload->repository->html_url}\">{$payload->repository->full_name}</a>\n\n"; | ||
$message .= "Done action: 🎉 <b>{$payload->workflow_job->runner_name}</b> ✨ \n\n"; | ||
} else { | ||
$message = "🚫 <b>Canceled Action</b> form 🦑<a href=\"{$payload->repository->html_url}\">{$payload->repository->full_name}</a>\n\n"; | ||
$message .= "Failed action: 🚫 <b>{$payload->workflow_job->runner_name}</b> ❌ \n\n"; | ||
} | ||
$message .= "🔗 Link: <a href=\"{$payload->workflow_job->html_url}\">{$payload->workflow_job->html_url}</a>\n\n"; | ||
echo $message; |
12 changes: 12 additions & 0 deletions
12
resources/views/events/github/workflow_job/in_progress.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,12 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$message = "🔧 <b>Action in progress</b> form 🦑<a href=\"{$payload->repository->html_url}\">{$payload->repository->full_name} </a>\n\n"; | ||
$message .= "Running action: 💥 <b>{$payload->workflow_job->runner_name}</b> ⏳\n\n"; | ||
$message .= "🔗 Link: <a href=\"{$payload->workflow_job->html_url}\">{$payload->workflow_job->html_url}</a>\n\n"; | ||
echo $message; |
10 changes: 10 additions & 0 deletions
10
resources/views/events/github/workflow_job/queued.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,10 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
$message = "🎉 <b>Action Queued</b> form 🦑<a href=\"{$payload->repository->html_url}\">{$payload->repository->full_name}</a>\n\n"; | ||
$message .= "Queued action: 💥 <b>{$payload->workflow_job->runner_name}</b> ⏰\n\n"; | ||
$message .= "🔗 Link: <a href=\"{$payload->workflow_job->html_url}\">{$payload->workflow_job->html_url}</a>\n\n"; |
Oops, something went wrong.