Skip to content

Commit 4ae342c

Browse files
committed
Merge branch 'add-wechat-bot-notification' of github.com:reallyli/laravel-unideploy into add-wechat-bot-notification
2 parents dc45aed + 8f54e26 commit 4ae342c

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/task/notification.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ function sendGroupMessage($subject)
2626
{
2727
$url = get('notify_channel_url');
2828

29-
3029
if (! $url) {
3130
throw new \InvalidArgumentException('[Laravel-Deployer]Notification is on but channel url is not set!');
3231
}
@@ -40,13 +39,13 @@ function sendGroupMessage($subject)
4039
'news' => [
4140
'articles' => [
4241
[
43-
'title' => get('user') . ' ' . $subject,
44-
'description' => '' . get('environment') . ' 环境更新 ' . get('branch') . ' 分支 ',
42+
'title' => get('user').' '.$subject,
43+
'description' => ''.get('environment').' 环境更新 '.get('branch').' 分支 ',
4544
'url' => get('app_repo_url', 'https://github.com'),
46-
'picurl' => get('pic_url', 'https://picsum.photos/id/' . rand(1, 1000) . '/800/600')
47-
]
48-
]
49-
]
45+
'picurl' => get('pic_url', 'https://picsum.photos/id/'.rand(1, 1000).'/800/600'),
46+
],
47+
],
48+
],
5049
];
5150
break;
5251
default:
@@ -57,7 +56,7 @@ function sendGroupMessage($subject)
5756
'分支名: '.get('branch'),
5857
'环境: '.get('environment'),
5958
]);
60-
$formParams = ['text' => $content];
59+
$formParams = ['text' => $content];
6160
break;
6261
}
6362

0 commit comments

Comments
 (0)