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
Example:
.cnb.yml
.issue-open: &issue-open
- name: issue-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: &issue-reopen
- name: issue-notice
image: tencentcom/wecom-message
settings:
robot: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx
content: |
> **$CNB_BUILD_USER reopened an issue**
> **Title:** $CNB_ISSUE_TITLE
> **Creator:** $CNB_ISSUE_OWNER
> [View Details]($CNB_EVENT_URL)
.issue-close: &issue-close
- name: issue-close
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
> **Creator:** $CNB_ISSUE_OWNER
> [View Details]($CNB_EVENT_URL)
$:
issue.close:
- stages:
- *issue-close
issue.reopen:
- stages:
- *issue-reopen
issue.open:
- stages:
- *issue-openFor the robot parameter, fill in the previously copied Webhook 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.