# 一些插件仓库的流水线模版,作用是配置 PR 流水线检查插件信息、mergeable时自动合并,以及主干更新时通知 market 更新插件信息 main: push: - stages: - name: trigger type: cnb:trigger options: token: $CNB_TOKEN event: api_trigger_upload_plugin_info slug: cnb/plugins/market branch: main env: PLUGIN_PATH: $CNB_REPO_NAME pull_request: lint: name: lint stages: - name: do commitlint image: tencentcom/commitlint - name: tencentcom/markdown-lint image: tencentcom/markdown-lint commands: - markdownlint README.md - name: cnbcool/plugin-lint image: cnbcool/plugin-lint - name: 添加评审人 type: git:reviewer options: # 评审人 reviewers: youkun.huang,loviselu,folgerfan,jingjingwu type: add-reviewer count: 2 exports: reviewersForAt: CURR_REVIEWER_FOR_AT - name: notify imports: https://cnb.cool/cnb/secrets/-/blob/main/envs/wework-robots.yml image: tencentcom/wecom-message settings: robot: $OCI_REVIEW_ROBOT content: | ${CNB_PULL_REQUEST_TITLE} [${CNB_EVENT_URL}](${CNB_EVENT_URL}) ${CURR_REVIEWER_FOR_AT} from ${CNB_BUILD_USER} pull_request.mergeable: - stages: - name: CR 通过后自动合并 type: git:auto-merge options: mergeType: squash removeSourceBranch: true $: issue.open: - stages: - name: issue-notice image: tencentcom/wecom-message imports: https://cnb.cool/cnb/secrets/-/blob/main/envs/wework-robots.yml settings: robot: $CNB_WARRIOR_ROBOT msgType: markdown content: | > **有人提插件issue啦** > **标 题:** $CNB_ISSUE_TITLE > **发起人:** $CNB_ISSUE_OWNER > **查看:** [$CNB_EVENT_URL]($CNB_EVENT_URL) issue.reopen: - stages: - name: issue-notice image: tencentcom/wecom-message imports: https://cnb.cool/cnb/secrets/-/blob/main/envs/wework-robots.yml settings: robot: $CNB_WARRIOR_ROBOT content: | > **$CNB_BUILD_USER重新打开了一个插件issue** > **标 题:** $CNB_ISSUE_TITLE > **发起人:** $CNB_ISSUE_OWNER > **查 看:** [$CNB_EVENT_URL]($CNB_EVENT_URL)