0
1
Login
Code
Issues
Pull requests
Events
Packages
b915d0859da1b0056d9a9c0c930d97bf43e39b35
Name
Commit
Updated at
.cnb.yml
LICENSE.txt
README.md
README
License

issue 信息通知到群聊示例

示例中,配置了如何将 issue 创建、关闭、重新打开信息通知到群聊

涉及文档

如何配置

  • issue.open 事件:issue 创建后,会触发 issue.open 事件,将 issue 信息通知到群聊
  • issue.reopen 事件:issue 关闭后被重新打开,会触发 issue.reopen 事件,将 issue 信息通知到群聊
  • issue.close 事件:issue 关闭后,会触发 issue.close 事件,将 issue 关闭信息通知到群聊
  • push 事件:push 事件触发后,使用 git:issue-update 内置任务自动修改 issue 标签

配置示例:

# .cnb.yml
main:
  push:
    - stages:
      - name: 更新 issue
        type: git:issue-update
        options:
          label:
            add: 已解决
            remove: 开发中
$:
  issue.open:
    - stages:
      - name: 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: |
            > **有人提issue啦**
            > **标  题:** $CNB_ISSUE_TITLE
            > **发起人:** $CNB_ISSUE_OWNER
            > [查看详情]($CNB_EVENT_URL)

  issue.reopen:
    - stages:
      - name: 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重新打开了一个issue**
            > **标  题:** $CNB_ISSUE_TITLE
            > **发起人:** $CNB_ISSUE_OWNER
            > [查看详情]($CNB_EVENT_URL)

            ${REVIEWED_BY}

  issue.close:
    - stages:
      - name: 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关闭了一个issue**
            > **标  题:** $CNB_ISSUE_TITLE
            > **发起人:** $CNB_ISSUE_OWNER
            > [查看详情]($CNB_EVENT_URL)

About

issue 信息通知

example

Release
0

Tag
0
Language
Markdown50.3%
YAML30.8%
Others18.9%