logo
1
3
Login
docs: 更新 README 中的文档链接

Example: Notifying Group Chats about Issue Activities

This example demonstrates how to configure notifications for issue creation, closure, and reopening in group chats.

badge badge badge

Related Documentation

Configuration Guide

  • issue.open event: Triggers when an issue is created, notifying the group chat
  • issue.reopen event: Triggers when a closed issue is reopened, notifying the group chat
  • issue.close event: Triggers when an issue is closed, notifying the group chat
  • push event: After push, automatically updates issue labels using git:issue-update

Configuration Example:

# .cnb.yml main: push: - stages: - name: Update issue type: git:issue-update options: label: add: Resolved remove: In Development $: issue.open: - stages: - name: Notify group about new issue image: tencentcom/wecom-message imports: https://cnb.cool/xxx/xxx/-/blob/main/envs/wework-robots.yml settings: robot: $REVIEW_ROBOT_ID msgType: markdown content: | > **New Issue Created** > **Title:** $CNB_ISSUE_TITLE > **Author:** $CNB_ISSUE_OWNER > [View Details]($CNB_EVENT_URL) issue.reopen: - stages: - name: Notify group about reopened issue image: tencentcom/wecom-message imports: https://cnb.cool/xxx/xxx/-/blob/main/envs/wework-robots.yml settings: robot: $REVIEW_ROBOT_ID content: | > **$CNB_BUILD_USER reopened an issue** > **Title:** $CNB_ISSUE_TITLE > **Author:** $CNB_ISSUE_OWNER > [View Details]($CNB_EVENT_URL) ${REVIEWED_BY} issue.close: - stages: - name: Notify group about closed issue image: tencentcom/wecom-message imports: https://cnb.cool/xxx/xxx/-/blob/main/envs/wework-robots.yml settings: robot: $REVIEW_ROBOT_ID content: | > **$CNB_BUILD_USER closed an issue** > **Title:** $CNB_ISSUE_TITLE > **Author:** $CNB_ISSUE_OWNER > [View Details]($CNB_EVENT_URL)