Skip to content

Commit 936b046

Browse files
committed
fix: update issues events for gitlab
1 parent adccb31 commit 936b046

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

lang/en/events/gitlab/issues.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
'closed' => [
66
'title' => '🚫 <b>Issue Closed </b> to 🦊 :issue by :user',
77
],
8+
'edited' => [
9+
'title' => '⚠️ <b>Issue has been edited</b> to 🦊 :issue by :user',
10+
],
811
'opened' => [
912
'title' => '⚠️ <b>New Issue</b> to 🦊 :issue by :user',
1013
],
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
<?php
22
/**
33
* @var $payload object
4+
* @var $event string
45
*/
56
6-
$message = "⚠️ <b>Issue has been edited</b> to 🦊<a href=\"{$payload->object_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->id}</a> by <b>{$payload->user->name}</b>\n\n";
7+
?>
8+
{!! __('tg-notifier::events/gitlab/issues.edited.title', [
9+
'issue' => "<a href='{$payload->object_attributes->url}'>{$payload->project->path_with_namespace}#{$payload->object_attributes->id}</a>",
10+
'user' => "<b>{$payload->user->name}</b>"
11+
]
12+
) !!}
713

8-
$message .= "📢 <b>{$payload->object_attributes->title}</b>\n";
14+
📢 <b>{{ $payload->object_attributes->title }}</b>
915

10-
$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php';
11-
12-
$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php';
13-
14-
echo $message;
16+
@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
17+
@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))

0 commit comments

Comments
 (0)