Skip to content

Commit

Permalink
Merge pull request #81 from tanhongit/update-event-template
Browse files Browse the repository at this point in the history
Add/Update event template
  • Loading branch information
tanhongit authored May 21, 2024
2 parents a067dac + f2e0f9f commit 12cdeea
Show file tree
Hide file tree
Showing 93 changed files with 234 additions and 151 deletions.
2 changes: 2 additions & 0 deletions lang/en/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
'branch' => 'Branch',
'commit' => 'Commit',
'title' => 'Title',
'state' => 'State',
'confidential' => 'Confidential',
];
2 changes: 2 additions & 0 deletions lang/en/events/gitlab/issues.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

return [
'issue_title' => '📢',
'default' => 'Default issue to :issue by :user',
'confidential_issue' => '🔒 <b>Confidential Issue</b> to :issue by :user',
'closed' => [
'title' => '<b>Issue Closed </b> to :issue by :user',
],
Expand Down
1 change: 1 addition & 0 deletions lang/en/events/gitlab/merge_request.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@
'update' => [
'title' => '<b>Merge Request Updated</b> - :repo by :user',
],
'default' => 'Here is the default message for merge request',
];
2 changes: 2 additions & 0 deletions lang/vi/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
'branch' => 'Tên nhánh',
'commit' => 'Commit',
'title' => 'Tiêu đề',
'state' => 'Trạng thái',
'confidential' => 'Bí mật',
];
1 change: 0 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ parameters:
tmpDir: build/phpstan
checkOctaneCompatibility: true
checkModelProperties: true
checkMissingIterableValueType: false
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
$repository = $payload->repository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
$repository = $payload->repository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
$repository = $payload->repository;
Expand Down
2 changes: 1 addition & 1 deletion resources/views/events/github/deploy_key/created.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
?>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/events/github/deploy_key/deleted.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
?>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/events/github/issue_comment/created.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var $event string
* @var object $payload
* @var string $event
*/
$issue = $payload->issue;
Expand Down
4 changes: 2 additions & 2 deletions resources/views/events/github/issue_comment/deleted.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var $event string
* @var object $payload
* @var string $event
*/
$issue = $payload->issue;
Expand Down
4 changes: 2 additions & 2 deletions resources/views/events/github/issue_comment/edited.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var $event string
* @var object $payload
* @var string $event
*/
$issue = $payload->issue;
Expand Down
4 changes: 2 additions & 2 deletions resources/views/events/github/issues/closed.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var $event string
* @var object $payload
* @var string $event
*/
$issue = $payload->issue;
Expand Down
4 changes: 2 additions & 2 deletions resources/views/events/github/issues/deleted.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var $event string
* @var object $payload
* @var string $event
*/
$issue = $payload->issue;
Expand Down
4 changes: 2 additions & 2 deletions resources/views/events/github/issues/edited.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var $event string
* @var object $payload
* @var string $event
*/
$issue = $payload->issue;
Expand Down
4 changes: 2 additions & 2 deletions resources/views/events/github/issues/locked.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var $event string
* @var object $payload
* @var string $event
*/
$issue = $payload->issue;
Expand Down
4 changes: 2 additions & 2 deletions resources/views/events/github/issues/opened.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var $event string
* @var object $payload
* @var string $event
*/
$issue = $payload->issue;
Expand Down
4 changes: 2 additions & 2 deletions resources/views/events/github/issues/pinned.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var $event string
* @var object $payload
* @var string $event
*/
$issue = $payload->issue;
Expand Down
4 changes: 2 additions & 2 deletions resources/views/events/github/issues/reopened.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var $event string
* @var object $payload
* @var string $event
*/
$issue = $payload->issue;
Expand Down
4 changes: 2 additions & 2 deletions resources/views/events/github/issues/unlocked.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var $event string
* @var object $payload
* @var string $event
*/
$issue = $payload->issue;
Expand Down
4 changes: 2 additions & 2 deletions resources/views/events/github/issues/unpinned.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var $event string
* @var object $payload
* @var string $event
*/
$issue = $payload->issue;
Expand Down
5 changes: 2 additions & 3 deletions resources/views/events/github/label/created.blade.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
$label = $payload->label;
$description = strlen($label->description) < 100 ? $label->description : substr($label->description, 0, 100).'...';
?>

{!! __('tg-notifier::events/github/label.created.title', [
Expand All @@ -14,4 +13,4 @@
) !!}

🔖 <b>{{ $payload->label->name }}</b>
<b>{!! __('tg-notifier::events/shared/github._description.title') !!}:</b> {{ $description }}
<b>{!! __('tg-notifier::events/shared/github._description.title') !!}:</b> {{ \Illuminate\Support\Str::limit($label->description) }}
2 changes: 1 addition & 1 deletion resources/views/events/github/label/deleted.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
?>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/events/github/label/edited.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
$changes = $payload->changes;
Expand Down
2 changes: 1 addition & 1 deletion resources/views/events/github/meta/deleted.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
?>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/events/github/ping/default.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
?>
Expand All @@ -16,4 +16,4 @@
@endif
@if(isset($payload->sender))
👤 {!! __('tg-notifier::events/github/ping.sender') !!}: <code>{{ $payload->sender->login }}</code>
@endif
@endif
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
$pull_request = $payload->pull_request;
Expand Down
4 changes: 2 additions & 2 deletions resources/views/events/github/pull_request/closed.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var $event string
* @var object $payload
* @var string $event
*/
$pull_request = $payload->pull_request;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
$pull_request = $payload->pull_request;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
$pull_request = $payload->pull_request;
Expand Down
4 changes: 2 additions & 2 deletions resources/views/events/github/pull_request/opened.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var $event string
* @var object $payload
* @var string $event
*/
$pull_request = $payload->pull_request;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
$textReviewers = '';
Expand Down
4 changes: 2 additions & 2 deletions resources/views/events/github/pull_request/reopened.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var $event string
* @var object $payload
* @var string $event
*/
$pull_request = $payload->pull_request;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
$pull_request = $payload->pull_request;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
$pull_request = $payload->pull_request;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
$pull_request = $payload->pull_request;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
$pull_request = $payload->pull_request;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
$pull_request = $payload->pull_request;
Expand Down
2 changes: 1 addition & 1 deletion resources/views/events/github/push/default.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
$count = count($payload->commits);
Expand Down
2 changes: 1 addition & 1 deletion resources/views/events/github/star/created.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
?>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/events/github/star/deleted.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
?>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $payload object
* @var object $payload
*/
?>
Expand All @@ -20,4 +20,4 @@
@endif
@if(isset($payload->team))
👥 {!! __('tg-notifier::events/github/team.added_to_repository.team') !!}: <a href='{{ $payload->team->html_url }}'><b>{{ $payload->team->name }}</b></a>
@endif
@endif
Loading

0 comments on commit 12cdeea

Please sign in to comment.