Skip to content

Commit 43a4560

Browse files
authored
Merge pull request #83 from tanhongit/gitlab-events
feat: add gitlab events
2 parents 435e953 + 3656d62 commit 43a4560

File tree

17 files changed

+124
-1
lines changed

17 files changed

+124
-1
lines changed

Diff for: composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
},
3838
"require": {
3939
"php": "^8.1",
40-
"cslant/telegram-git-notifier": "^v1.3"
40+
"cslant/telegram-git-notifier": "^v1.4"
4141
},
4242
"require-dev": {
4343
"friendsofphp/php-cs-fixer": "^v3.0",

Diff for: lang/de/app.php

+9
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,13 @@
77
'branch' => 'Branch',
88
'commit' => 'Commit',
99
'title' => 'Title',
10+
'state' => 'State',
11+
'confidential' => 'Confidential',
12+
'status' => 'Status',
13+
'link' => 'Link',
14+
'repo' => 'Repository',
15+
'author' => [
16+
'name' => 'Name',
17+
'email' => 'Email',
18+
],
1019
];

Diff for: lang/de/events/gitlab/job.php

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
return [
4+
'title' => 'Update Job Status',
5+
'name' => 'Job Name',
6+
];

Diff for: lang/de/events/gitlab/pipeline.php

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
return [
4+
'title' => 'Pipeline Status Update',
5+
];

Diff for: lang/en/app.php

+7
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,11 @@
99
'title' => 'Title',
1010
'state' => 'State',
1111
'confidential' => 'Confidential',
12+
'status' => 'Status',
13+
'link' => 'Link',
14+
'repo' => 'Repository',
15+
'author' => [
16+
'name' => 'Name',
17+
'email' => 'Email',
18+
],
1219
];

Diff for: lang/en/events/gitlab/job.php

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
return [
4+
'title' => 'Update Job Status',
5+
'name' => 'Job Name',
6+
];

Diff for: lang/en/events/gitlab/pipeline.php

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
return [
4+
'title' => 'Pipeline Status Update',
5+
];

Diff for: lang/ja/app.php

+9
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,13 @@
77
'branch' => 'Branch',
88
'commit' => 'Commit',
99
'title' => 'Title',
10+
'state' => 'State',
11+
'confidential' => 'Confidential',
12+
'status' => 'Status',
13+
'link' => 'Link',
14+
'repo' => 'Repository',
15+
'author' => [
16+
'name' => 'Name',
17+
'email' => 'Email',
18+
],
1019
];

Diff for: lang/ja/events/gitlab/job.php

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
return [
4+
'title' => 'Update Job Status',
5+
'name' => 'Job Name',
6+
];

Diff for: lang/ja/events/gitlab/pipeline.php

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
return [
4+
'title' => 'Pipeline Status Update',
5+
];

Diff for: lang/vi/app.php

+7
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,11 @@
99
'title' => 'Tiêu đề',
1010
'state' => 'Trạng thái',
1111
'confidential' => 'Bí mật',
12+
'status' => 'Trạng thái',
13+
'link' => 'Liên kết',
14+
'repo' => 'Kho',
15+
'author' => [
16+
'name' => 'Tên',
17+
'email' => 'Email',
18+
],
1219
];

Diff for: lang/vi/events/gitlab/job.php

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
return [
4+
'title' => 'Cập nhật trạng thái của Job',
5+
'name' => 'Tên Job',
6+
];

Diff for: lang/vi/events/gitlab/pipeline.php

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
return [
4+
'title' => 'Cập nhật trạng thái Pipeline',
5+
];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
/**
3+
* @var object $payload
4+
* @var string $event
5+
*/
6+
7+
?>
8+
Need to implement this view
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
/**
3+
* @var object $payload
4+
* @var string $event
5+
*/
6+
7+
?>
8+
Need to implement this view

Diff for: resources/views/events/gitlab/job/default.blade.php

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
/**
3+
* @var object $payload
4+
* @var string $event
5+
*/
6+
7+
?>
8+
9+
🛸 {{ __('tg-notifier::events/gitlab/job.title') }} 🦊
10+
11+
🚀 {{ __('tg-notifier::app.repo') }}: <a href="{{ $payload->project->web_url }}">{{ $payload->project->path_with_namespace }}</a>
12+
🛸 {{ __('tg-notifier::events/gitlab/job.name') }}: <code>{{ $payload->build_name }}</code>
13+
🌳 {{ __('tg-notifier::app.branch') }}: <code>{{ $payload->project->default_branch }}</code>
14+
👤 {{ __('tg-notifier::app.author.name') }}: <code>{{ $payload->commit->author_name }}</code>
15+
💻 {{ __('tg-notifier::app.commit') }}: <code>{{ $payload->commit->message }}</code>
16+
🚦 {{ __('tg-notifier::app.status') }}: <code>{{ $payload->build_status }}</code>
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
/**
3+
* @var object $payload
4+
* @var string $event
5+
*/
6+
7+
?>
8+
9+
🛰 {{ __('tg-notifier::events/gitlab/pipeline.title') }} 🦊
10+
11+
🚀 {{ __('tg-notifier::app.repo') }}: <a href="{{ $payload->project->web_url }}">{{ $payload->project->path_with_namespace }}</a>
12+
🌳 {{ __('tg-notifier::app.branch') }}: <code>{{ $payload->object_attributes->ref }}</code>
13+
👤 {{ __('tg-notifier::app.author.name') }}: <code>{{ $payload->commit->author->name }}</code>
14+
💻 {{ __('tg-notifier::app.commit') }}: <a href="{{ $payload->commit->url }}">{{ $payload->commit->message }}</a>
15+
🚦 {{ __('tg-notifier::app.status') }}: Pipeline <code>{{ $payload->object_attributes->status }}</code> <code>{{ $payload->object_attributes->duration ? "⏱️ {$payload->object_attributes->duration}s" : '' }}</code>

0 commit comments

Comments
 (0)