Skip to content

Commit

Permalink
(#33) update template message for some events v8
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Jun 29, 2023
1 parent 8a16961 commit 15f813f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
10 changes: 8 additions & 2 deletions resources/events/workflow_job/completed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
* @var $payload mixed
*/

$message = "🎉 <b>Action Completed</b> from <a href=\"{$payload->repository->html_url}\">{$payload->repository->full_name} </a>\n\n";
if ($payload->workflow_job->conclusion === 'success') {
$message = "🎉 <b>Action Completed</b> from <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";
$message .= "Done action: 🎉 <b>{$payload->workflow_job->runner_name}</b> ✨ \n\n";
} else {
$message = "🚫 <b>Canceled Action</b> from <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";

Expand Down
10 changes: 8 additions & 2 deletions resources/events/workflow_run/completed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
* @var $payload mixed
*/

$message = "🎉 <b>Workflow Completed</b> from <a href=\"{$payload->repository->html_url}\">{$payload->repository->full_name}</a>\n\n";
if ($payload->workflow_run->conclusion === 'success') {
$message = "🎉 <b>Workflow Completed</b> from <a href=\"{$payload->repository->html_url}\">{$payload->repository->full_name}</a>\n\n";

$message .= "Done workflow: 🎉 <b>{$payload->workflow_run->name}</b> ✨ \n\n";
$message .= "Done workflow: 🎉 <b>{$payload->workflow_run->name}</b> ✨ \n\n";
} else {
$message = "🚫 <b>Canceled Workflow</b> from <a href=\"{$payload->repository->html_url}\">{$payload->repository->full_name}</a>\n\n";

$message .= "Failed workflow: 🚫 <b>{$payload->workflow_run->name}</b> ❌ \n\n";
}

// $message .= "📤 Commit: <b>{$payload->workflow_run->head_commit->message}</b>\n\n";

Expand Down
4 changes: 2 additions & 2 deletions resources/globals/access_denied.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
🔒 <b>Access Denied to Bot </b>🚫
🔒 <b>Access Denied to Bot</b> 🚫

Please contact administrator for further information, Thank You..
Please contact the administrator for further information, Thank You..
2 changes: 1 addition & 1 deletion resources/tools/about.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Thanks for using our bot.

The bot is designed to send notifications based on GitHub events from your github repo instantly to your Telegram account.
The bot is designed to send notifications based on GitHub events from your GitHub repo instantly to your Telegram account.

0 comments on commit 15f813f

Please sign in to comment.