diff --git a/resources/events/watch/started.php b/resources/events/watch/started.php new file mode 100644 index 0000000..79ef9ff --- /dev/null +++ b/resources/events/watch/started.php @@ -0,0 +1,10 @@ +Watch Started from repository->html_url}\">{$payload->repository->full_name}\n\n"; + +$message .= "👤 Watcher: {$payload->sender->login} 👀\n\n"; + +echo $message; diff --git a/resources/events/workflow_job/queued.php b/resources/events/workflow_job/queued.php new file mode 100644 index 0000000..2cbaa75 --- /dev/null +++ b/resources/events/workflow_job/queued.php @@ -0,0 +1,10 @@ +Action Queued from repository->html_url}\">{$payload->repository->full_name}\n\n"; + +$message .= "Queued action: 💥 {$payload->workflow_job->runner_name} ⏰\n\n"; + +$message .= "🔗 Link: workflow_job->html_url}\">{$payload->workflow_job->html_url}\n\n"; diff --git a/resources/events/workflow_run/completed.php b/resources/events/workflow_run/completed.php index f9b63a4..424c6bd 100644 --- a/resources/events/workflow_run/completed.php +++ b/resources/events/workflow_run/completed.php @@ -3,11 +3,11 @@ * @var $payload mixed */ -$message = "🎉 Workflow Completed from repository->html_url}\">{$payload->repository->full_name} \n\n"; +$message = "🎉 Workflow Completed from repository->html_url}\">{$payload->repository->full_name}\n\n"; $message .= "Done workflow: 🎉 {$payload->workflow_run->name} ✨ \n\n"; -$message .= "📤 Commit: {$payload->workflow_run->head_commit->message}\n\n"; +// $message .= "📤 Commit: {$payload->workflow_run->head_commit->message}\n\n"; $message .= "🔗 Link: workflow_run->html_url}\">{$payload->workflow_run->html_url}\n\n"; diff --git a/resources/events/workflow_run/requested.php b/resources/events/workflow_run/requested.php index 908c51c..58ccbe0 100644 --- a/resources/events/workflow_run/requested.php +++ b/resources/events/workflow_run/requested.php @@ -3,11 +3,11 @@ * @var $payload mixed */ -$message = "🔧 Workflow Requested from repository->html_url}\">{$payload->repository->full_name} \n\n"; +$message = "🔧 Workflow Requested from repository->html_url}\">{$payload->repository->full_name}\n\n"; $message .= "Running workflow: 💥 {$payload->workflow_run->name} ⏳\n\n"; -$message .= "📤 Commit: {$payload->workflow_run->head_commit->message}\n\n"; +// $message .= "📤 Commit: {$payload->workflow_run->head_commit->message}\n\n"; $message .= "🔗 Link: workflow_run->html_url}\">{$payload->workflow_run->html_url}\n\n"; diff --git a/resources/globals/access_denied.php b/resources/globals/access_denied.php new file mode 100644 index 0000000..03eadd7 --- /dev/null +++ b/resources/globals/access_denied.php @@ -0,0 +1,3 @@ +🔒 Access Denied to Bot 🚫 + +Please contact administrator for further information, Thank You.. diff --git a/src/Services/NotificationService.php b/src/Services/NotificationService.php index 9f57fa4..e92c9c9 100644 --- a/src/Services/NotificationService.php +++ b/src/Services/NotificationService.php @@ -20,7 +20,7 @@ class NotificationService */ public function accessDenied(TelegramService $telegramService): void { - $reply = "🔒 Access Denied to Bot 🚫\n\nPlease contact administrator for further information, Thank You.."; + $reply = get_template('globals.access_denied'); $content = array( 'chat_id' => $telegramService->chatId, 'text' => $reply,