-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#33) update template message for some events v4
- Loading branch information
Showing
13 changed files
with
112 additions
and
29 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,14 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
|
||
$message = "️🗑 <b>Issue 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"; | ||
|
||
if (isset($payload->issue->assignee)) { | ||
$message .= "🙋 Assignee: <a href=\"{$payload->issue->assignee->html_url}\">@{$payload->issue->assignee->login}</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
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 | ||
*/ | ||
|
||
$message = "🔒 <b>Issue Locked</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"; | ||
|
||
if (isset($payload->issue->assignee)) { | ||
$message .= "🙋 Assignee: <a href=\"{$payload->issue->assignee->html_url}\">@{$payload->issue->assignee->login}</a>\n\n"; | ||
} | ||
|
||
$message .= require __DIR__ . '/../partials/_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
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 | ||
*/ | ||
|
||
$message = "📌 <b>Issue Pinned</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"; | ||
|
||
if (isset($payload->issue->assignee)) { | ||
$message .= "🙋 Assignee: <a href=\"{$payload->issue->assignee->html_url}\">@{$payload->issue->assignee->login}</a>\n\n"; | ||
} | ||
|
||
$message .= require __DIR__ . '/../partials/_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
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 | ||
*/ | ||
|
||
$message = "🔐 <b>Issue Unlocked</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"; | ||
|
||
if (isset($payload->issue->assignee)) { | ||
$message .= "🙋 Assignee: <a href=\"{$payload->issue->assignee->html_url}\">@{$payload->issue->assignee->login}</a>\n\n"; | ||
} | ||
|
||
$message .= require __DIR__ . '/../partials/_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,16 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ | ||
|
||
$message = "🔔 <b>Issue Unpinned</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"; | ||
|
||
if (isset($payload->issue->assignee)) { | ||
$message .= "🙋 Assignee: <a href=\"{$payload->issue->assignee->html_url}\">@{$payload->issue->assignee->login}</a>\n\n"; | ||
} | ||
|
||
$message .= require __DIR__ . '/../partials/_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 | ||
*/ | ||
|
||
if (!empty($payload->issue->body)) { | ||
$body = $payload->issue->body; | ||
if (strlen($body) > 50) { | ||
$body = substr($body, 0, 50) . '...'; | ||
} | ||
return "📖 {$body}"; | ||
} | ||
|
||
return ""; |
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,4 @@ | ||
<?php | ||
/** | ||
* @var $payload mixed | ||
*/ |
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