Issue Notification to Enterprise WeChat Group
About 248 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. We recommend injecting it via env (avoid hardcoding sensitive values); the example below references it uniformly through WECOM_ROBOT.
Each Issue lifecycle event corresponds to one pipeline configuration under $.{event}. The following complete example shows the open, reopen, and close events, injecting the Enterprise WeChat bot Webhook URL via env (avoid hardcoding sensitive values). All events share the same structure — just adjust the event name and content:
env:
WECOM_ROBOT: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx
$:
# Notify when an Issue is opened
issue.open:
- stages:
- name: notice
image: tencentcom/wecom-message
settings:
robot: $WECOM_ROBOT
content: |
> **New Issue Created**
> **Title:** $CNB_ISSUE_TITLE
> **Creator:** $CNB_ISSUE_OWNER
> [View Details]($CNB_EVENT_URL)
# Notify when an Issue is reopened
issue.reopen:
- stages:
- name: notice
image: tencentcom/wecom-message
settings:
robot: $WECOM_ROBOT
content: |
> **Issue Reopened**
> **Title:** $CNB_ISSUE_TITLE
> [View Details]($CNB_EVENT_URL)
# Notify when an Issue is closed
issue.close:
- stages:
- name: notice
image: tencentcom/wecom-message
settings:
robot: $WECOM_ROBOT
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.