-
-
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.
fix: update merge request events for gitlab
- Loading branch information
Showing
11 changed files
with
138 additions
and
90 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
return [ | ||
'review' => '👥 Reviewers: ', | ||
'closed' => [ | ||
'title' => '❌ <b>Merge Request Closed</b> - 🦊:repo by :user', | ||
], | ||
'merged' => [ | ||
'title' => '✅ <b>Merge Request Merged</b> - 🦊:repo by :user', | ||
], | ||
'opened' => [ | ||
'title' => '👷♂️🛠️ <b>New Merge Request</b> - 🦊:issue by :user', | ||
], | ||
'reopened' => [ | ||
'title' => '👷♂️🛠️ <b>Merge Request Reopened</b> - 🦊:issue by :user', | ||
], | ||
'approved' => [ | ||
'title' => '👍 <b>Merge Request Approved</b> ✅ - 🦊:issue by :user', | ||
], | ||
'unapproved' => [ | ||
'title' => '👎 <b>Merge Request Unapproved</b> ❌ - 🦊:issue by :user', | ||
], | ||
'approval' => [ | ||
'title' => '👍 <b>Merge Request Approval</b> ✅ - 🦊:issue by :user', | ||
], | ||
'unapproval' => [ | ||
'title' => '👎 <b>Merge Request Unapproval</b> ❌ - 🦊:issue by :user', | ||
], | ||
]; |
18 changes: 18 additions & 0 deletions
18
resources/views/events/gitlab/merge_request/approval.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 object | ||
* @var $event string | ||
*/ | ||
?> | ||
{!! __('tg-notifier::events/gitlab/merge_request.approval.title', [ | ||
'repo' => "<a href='{$payload->object_attributes->url}'>{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a>", | ||
'user' => "<b>{$payload->user->name}</b>" | ||
]) !!} | ||
|
||
🛠 <b>{{ $payload->object_attributes->title }}</b> | ||
|
||
🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 | ||
@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) | ||
@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) | ||
@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) |
22 changes: 11 additions & 11 deletions
22
resources/views/events/gitlab/merge_request/approved.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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?php | ||
/** | ||
* @var $payload object | ||
* @var $event string | ||
*/ | ||
$message = "✅ <b>Merge Request Approved</b> to 🦊<a href=\"{$payload->object_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a> by <b>{$payload->user->name}</b>\n\n"; | ||
?> | ||
{!! __('tg-notifier::events/gitlab/merge_request.approved.title', [ | ||
'repo' => "<a href='{$payload->object_attributes->url}'>{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a>", | ||
'user' => "<b>{$payload->user->name}</b>" | ||
]) !!} | ||
|
||
$message .= "🛠 <b>{$payload->object_attributes->title}</b> \n\n"; | ||
🛠 <b>{{ $payload->object_attributes->title }}</b> | ||
|
||
$message .= "🌳 {$payload->object_attributes->source_branch} -> {$payload->object_attributes->target_branch} 🎯 \n"; | ||
$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; | ||
$message .= require __DIR__ . '/partials/_reviewers.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; | ||
echo $message; | ||
🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 | ||
@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) | ||
@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) | ||
@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) |
22 changes: 11 additions & 11 deletions
22
resources/views/events/gitlab/merge_request/close.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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?php | ||
/** | ||
* @var $payload object | ||
* @var $event string | ||
*/ | ||
$message = "❌ <b>Close Merge Request</b> - 🦊<a href=\"{$payload->object_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a> by <b>{$payload->user->name}</b>\n\n"; | ||
?> | ||
{!! __('tg-notifier::events/gitlab/merge_request.closed.title', [ | ||
'repo' => "<a href='{$payload->object_attributes->url}'>{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a>", | ||
'user' => "<b>{$payload->user->name}</b>" | ||
]) !!} | ||
|
||
$message .= "🛠 <b>{$payload->object_attributes->title}</b> \n\n"; | ||
🛠 <b>{{ $payload->object_attributes->title }}</b> | ||
|
||
$message .= "🌳 {$payload->object_attributes->source_branch} -> {$payload->object_attributes->target_branch} 🎯 \n"; | ||
$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; | ||
$message .= require __DIR__ . '/partials/_reviewers.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; | ||
echo $message; | ||
🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 | ||
@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) | ||
@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) | ||
@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) |
22 changes: 11 additions & 11 deletions
22
resources/views/events/gitlab/merge_request/merge.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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?php | ||
/** | ||
* @var $payload object | ||
* @var $event string | ||
*/ | ||
$message = "✅🎉 <b>Merge Request Merged</b> to 🦊<a href=\"{$payload->object_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a> by <b>{$payload->user->name}</b>\n\n"; | ||
?> | ||
{!! __('tg-notifier::events/gitlab/merge_request.merged.title', [ | ||
'repo' => "<a href='{$payload->object_attributes->url}'>{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a>", | ||
'user' => "<b>{$payload->user->name}</b>" | ||
]) !!} | ||
|
||
$message .= "🛠 <b>{$payload->object_attributes->title}</b> \n\n"; | ||
🛠 <b>{{ $payload->object_attributes->title }}</b> | ||
|
||
$message .= "🌳 {$payload->object_attributes->source_branch} -> {$payload->object_attributes->target_branch} 🎯 \n"; | ||
$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; | ||
$message .= require __DIR__ . '/partials/_reviewers.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; | ||
echo $message; | ||
🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 | ||
@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) | ||
@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) | ||
@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) |
22 changes: 11 additions & 11 deletions
22
resources/views/events/gitlab/merge_request/open.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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?php | ||
/** | ||
* @var $payload object | ||
* @var $event string | ||
*/ | ||
$message = "👷♂️🛠️ <b>Merge Request Opened</b> to 🦊<a href=\"{$payload->object_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a> by <b>{$payload->user->name}</b>\n\n"; | ||
?> | ||
{!! __('tg-notifier::events/gitlab/merge_request.opened.title', [ | ||
'repo' => "<a href='{$payload->object_attributes->url}'>{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a>", | ||
'user' => "<b>{$payload->user->name}</b>" | ||
]) !!} | ||
|
||
$message .= "🛠 <b>{$payload->object_attributes->title}</b> \n\n"; | ||
🛠 <b>{{ $payload->object_attributes->title }}</b> | ||
|
||
$message .= "🌳 {$payload->object_attributes->source_branch} -> {$payload->object_attributes->target_branch} 🎯 \n"; | ||
$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; | ||
$message .= require __DIR__ . '/partials/_reviewers.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; | ||
echo $message; | ||
🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 | ||
@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) | ||
@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) | ||
@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) |
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
22 changes: 11 additions & 11 deletions
22
resources/views/events/gitlab/merge_request/reopen.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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?php | ||
/** | ||
* @var $payload object | ||
* @var $event string | ||
*/ | ||
$message = "👷♂️🛠️ <b>Merge Request Reopened</b> to 🦊<a href=\"{$payload->object_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a> by <b>{$payload->user->name}</b>\n\n"; | ||
?> | ||
{!! __('tg-notifier::events/gitlab/merge_request.opened.title', [ | ||
'repo' => "<a href='{$payload->object_attributes->url}'>{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a>", | ||
'user' => "<b>{$payload->user->name}</b>" | ||
]) !!} | ||
|
||
$message .= "🛠 <b>{$payload->object_attributes->title}</b> \n\n"; | ||
🛠 <b>{{ $payload->object_attributes->title }}</b> | ||
|
||
$message .= "🌳 {$payload->object_attributes->source_branch} -> {$payload->object_attributes->target_branch} 🎯 \n"; | ||
$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; | ||
$message .= require __DIR__ . '/partials/_reviewers.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; | ||
echo $message; | ||
🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 | ||
@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) | ||
@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) | ||
@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) |
22 changes: 11 additions & 11 deletions
22
resources/views/events/gitlab/merge_request/unapproval.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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?php | ||
/** | ||
* @var $payload object | ||
* @var $event string | ||
*/ | ||
$message = "⛔🛠️ <b>Merge Request Unapproved</b> to 🦊<a href=\"{$payload->object_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a> by <b>{$payload->user->name}</b>\n\n"; | ||
?> | ||
{!! __('tg-notifier::events/gitlab/merge_request.unapproval.title', [ | ||
'repo' => "<a href='{$payload->object_attributes->url}'>{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a>", | ||
'user' => "<b>{$payload->user->name}</b>" | ||
]) !!} | ||
|
||
$message .= "🛠 <b>{$payload->object_attributes->title}</b> \n\n"; | ||
🛠 <b>{{ $payload->object_attributes->title }}</b> | ||
|
||
$message .= "🌳 {$payload->object_attributes->source_branch} -> {$payload->object_attributes->target_branch} 🎯 \n"; | ||
$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; | ||
$message .= require __DIR__ . '/partials/_reviewers.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; | ||
echo $message; | ||
🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 | ||
@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) | ||
@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) | ||
@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) |
22 changes: 11 additions & 11 deletions
22
resources/views/events/gitlab/merge_request/unapproved.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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?php | ||
/** | ||
* @var $payload object | ||
* @var $event string | ||
*/ | ||
$message = "❌ <b>Close Merge Request</b> - 🦊<a href=\"{$payload->object_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a> by <b>{$payload->user->name}</b>\n\n"; | ||
?> | ||
{!! __('tg-notifier::events/gitlab/merge_request.unapproved.title', [ | ||
'repo' => "<a href='{$payload->object_attributes->url}'>{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a>", | ||
'user' => "<b>{$payload->user->name}</b>" | ||
]) !!} | ||
|
||
$message .= "🛠 <b>{$payload->object_attributes->title}</b> \n\n"; | ||
🛠 <b>{{ $payload->object_attributes->title }}</b> | ||
|
||
$message .= "🌳 {$payload->object_attributes->source_branch} -> {$payload->object_attributes->target_branch} 🎯 \n"; | ||
$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; | ||
$message .= require __DIR__ . '/partials/_reviewers.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; | ||
echo $message; | ||
🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 | ||
@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) | ||
@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) | ||
@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) |
22 changes: 11 additions & 11 deletions
22
resources/views/events/gitlab/merge_request/update.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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?php | ||
/** | ||
* @var $payload object | ||
* @var $event string | ||
*/ | ||
$message = "👷♂️🛠️ <b>Merge Request Updated</b> to 🦊<a href=\"{$payload->object_attributes->url}\">{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a> by <b>{$payload->user->name}</b>\n\n"; | ||
?> | ||
{!! __('tg-notifier::events/gitlab/merge_request.update.title', [ | ||
'repo' => "<a href='{$payload->object_attributes->url}'>{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a>", | ||
'user' => "<b>{$payload->user->name}</b>" | ||
]) !!} | ||
|
||
$message .= "🛠 <b>{$payload->object_attributes->title}</b> \n\n"; | ||
🛠 <b>{{ $payload->object_attributes->title }}</b> | ||
|
||
$message .= "🌳 {$payload->object_attributes->source_branch} -> {$payload->object_attributes->target_branch} 🎯 \n"; | ||
$message .= require __DIR__ . '/../../shared/partials/gitlab/_assignees.php'; | ||
$message .= require __DIR__ . '/partials/_reviewers.php'; | ||
$message .= require __DIR__ . '/../../shared/partials/gitlab/_body.php'; | ||
echo $message; | ||
🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 | ||
@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) | ||
@include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) | ||
@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) |