Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .config/notification_provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,14 @@ slack:
host: https://hooks.slack.com/services/XXXXXXXXXX
channel: channel_name
username: bot_name
title_emoji: none/emoji_name
title_emoji: none/emoji_name
dingtalk:
type: dingtalk_notification_provider
enable: false
token: 只需填写授权码部分,如:https://oapi.dingtalk.com/robot/send?access_token=XXXXXXX,授权码则是XXXXXX部分
secret: 选填。创建时没有设置,则填none
feishu:
type: feishu_notification_provider
enable: false
token: 只需填授权码部分,如https://open.feishu.cn/open-apis/bot/v2/hook/XXXXXXX,授权码则是XXXXXX部分
secret: 选填。创建时没有设置,则填none
42 changes: 42 additions & 0 deletions docs/zh/user_guide/dingtalk_notification_provider/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 钉钉(Dingtalk) webhooks

钉钉(没什么好说的,作为添加者表示铃声听着烦,要不是Slack推送对国内安卓不友好。企业微信越来越麻烦.....我更喜欢飞书的显示效果)

# 效果如图

| 移动端 | 桌面端 |
| :----------------------------: | :-------------------------------------------: |
| <img src="images/mobile.jpg"/> | <img src="images/pc.jpg" style="zoom:90%;" /> |

# 使用说明

### 钉钉 部分

- 在群聊中添加自定义webhook机器人

<img src="images/add-robot.jpg">

##### 【注意】钉钉特性,安全设置中`加签` 或 `自定义关键词` **二选一**,`自定义关键词`务必设置成:`webhook`,不然钉钉不会发送消息



### 将 自定义机器人 webhooks 接入 Kubespider

- 复制 机器人`Webhook URL`

- 修改 Kubespider 中 notification_provider.yaml 配置文件

```yaml
dingtalk:
type: dingtalk_notification_provider
enable: false
token: 只需填写授权码部分,如:https://oapi.dingtalk.com/robot/send?access_token=XXXXXXX,授权码则是XXXXXX部分
secret: 选填。创建时没有设置加签,则填none
```

### 配置说明

- `type`: 消息通知提供器的类型。**(无需更改)**
- `enable`: 消息通知提供器是否启用,**true**为启用,**false**为关闭。
- `token`: **Webhook 的授权码**,如:access_token=XXXXXXX中的`XXXXX`
- `secret`: 如果设置了加签,把密钥填在此处,如果没设置则填`none`
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions docs/zh/user_guide/feishu_notification_provider/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 飞书(Feishu) webhooks

(感觉比钉钉显示效果好,可以以话题的显示方式,其次办公没用飞书,对它没啥厌恶的感觉)

# 效果如图

| 移动端 | 桌面端 |
| :----------------------------------------------------------: | :-------------------------: |
| <img src="images/mobile1.jpg" style="zoom:50%;"/><img src="images/mobile.jpg" style="zoom:50%;"/> | <img src="images/pc.jpg" /> |

# 使用说明

### 飞书 部分

- 在群聊中添加自定义webhook机器人

<img src="images/add-robot.jpg" >

##### 【注意】飞书不会像钉钉强行让你选择一项安全设置,可以自行抉择要不要设置



### 将 自定义机器人 webhooks 接入 Kubespider

- 复制 机器人`Webhook URL`

- 修改 Kubespider 中 notification_provider.yaml 配置文件

```yaml
feishu:
type: feishu_notification_provider
enable: false
token: 只需填授权码部分,如https://open.feishu.cn/open-apis/bot/v2/hook/XXXXXXX,授权码则是XXXXXX部分
secret: 选填。创建时没有设置,则填none
```

### 配置说明

- `type`: 消息通知提供器的类型。**(无需更改)**
- `enable`: 消息通知提供器是否启用,**true**为启用,**false**为关闭。
- `token`: **Webhook 的授权码**,如:access_token=XXXXXXX中的`XXXXX`
- `secret`: 如果设置了加签,把密钥填在此处,如果没设置则填`none`
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion kubespider/core/config_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
import notification_provider.qq_notification_provider.provider as qq_notification_provider
import notification_provider.bark_notification_provider.provider as bark_notification_provider
import notification_provider.slack_notification_provider.provider as slack_notification_provider
import notification_provider.dingtalk_notification_provider.provider as dingtalk_notification_provider
import notification_provider.feishu_notification_provider.provider as feishu_notification_provider

# Source provider init related
source_provider_init_func = {
Expand Down Expand Up @@ -84,7 +86,9 @@
'telegram_notification_provider': telegram_notification_provider.TelegramNotificationProvider,
'qq_notification_provider': qq_notification_provider.QQNotificationProvider,
'bark_notification_provider': bark_notification_provider.BarkNotificationProvider,
'slack_notification_provider': slack_notification_provider.SlackNotificationProvider
'slack_notification_provider': slack_notification_provider.SlackNotificationProvider,
'dingtalk_notification_provider': dingtalk_notification_provider.DingtalkNotificationProvider,
'feishu_notification_provider': feishu_notification_provider.FeishuNotificationProvider
}


Expand Down
Loading
Loading