Issue Notification to Enterprise WeChat Group
About 194 wordsLess than 1 minute
Add Group Bot
Add a bot to your Enterprise WeChat group and copy the obtained Webhook URL.
Configure Pipeline
Fill in the robot field with the copied Webhook URL. Add the following configuration to .cnb.yml. Multiple Issue lifecycle events can be placed under the same $. — all events share the same Enterprise WeChat group bot Webhook URL:
.cnb.yml
$:
issue.open:
- stages:
- name: notice
image: tencentcom/wecom-message
settings:
robot: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx
content: |
> **New Issue Created**
> **Title:** $CNB_ISSUE_TITLE
> **Creator:** $CNB_ISSUE_OWNER
> [View Details]($CNB_EVENT_URL)
issue.reopen:
- stages:
- name: notice
image: tencentcom/wecom-message
settings:
robot: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx
content: |
> **Issue Reopened**
> **Title:** $CNB_ISSUE_TITLE
> [View Details]($CNB_EVENT_URL)
issue.close:
- stages:
- name: notice
image: tencentcom/wecom-message
settings:
robot: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx
content: |
> **$CNB_BUILD_USER closed an issue**
> **Title:** $CNB_ISSUE_TITLE
> [View Details]($CNB_EVENT_URL)The pipeline triggerer is the user who created, closed, or reopened the Issue.
The message format can be customized. For available variables, see Environment Variables.