已合并
docs: add robot issue manage intro #48
docs: add robot issue manage intro #48
已合并
drizzlezyk创建于 3月27日
3 个文件变更+111-1
Aconfig/bot-issue-manage.yaml+16-0
@@ -0,0 +1,16 @@
1+bot-issue-manage:
2+ # 标签名称配置
3+ label_resolve: "resolved"
4+ label_stale: "stale"
5+ label_wait_feedback: "wait-feedback"
6+ 
7+ # 时间配置(天)
8+ resolve_to_stale_days: 7
9+ stale_to_close_days: 14
10+ wait_feedback_to_warn_days: 7
11+ wait_feedback_to_close_days: 14
12+ 
13+ # 评论内容
14+ stale_comment: "您好,当前Issue标记为resolved且有一段时间未进一步更新,因此我们将其标记为'stale'(闲置)状态。若您认为这是误操作,可通过添加任意评论来去除'stale'标签。标记为stale的Issue在14天内无更新活动将自动关闭。"
15+ wait_feedback_warn_comment: "您好,为了更准确地定位和解决问题,我们需要您提供上述提到的相关信息。如果 14 天内没有进一步更新,我们将暂时关闭此 Issue。感谢您的理解与配合。"
16+ wait_feedback_close_comment: "您好,由于该 Issue 已有一段时间没有更新,我们先将其关闭。如果您后续有新的进展或诉求,欢迎随时重新开启此 Issue 或提交新的 Issue,我们会继续为您跟进。"
Adocs/robot/robot能力列表.md+94-0
@@ -0,0 +1,94 @@
1+## Robot 能力列表
2+ 
3+| 能力分类 | 具体功能 | 详细判定规则与逻辑 | 机器人执行动作 | 关键标签/状态 |
4+| :--- | :--- | :--- | :--- | :--- |
5+| **已解决管理 (Issue)** | 已解决自动识别 | 检查已关闭(Closed)的 Issue,若其关联的所有 Pull Request (PR) 均已合入(Merged),则判定为已解决。 | 自动添加 resolved 标签 | resolved |
6+| **已解决管理 (Issue)** | 闲置状态标记 (Stale) | 针对带有 resolved 标签且处于 Open 状态的 Issue,若提单人超过 7 天未进一步答复。 | 发布提醒评论并添加 stale 标签,告知用户若无异议将自动关闭。 | stale |
7+| **已解决管理 (Issue)** | 活跃状态恢复 | 针对带有 stale 或 resolved 标签的 Issue,若提单人在此期间重新发布了评论。 | 自动移除 stale 和 resolved 标签,将其恢复为活跃跟进状态。 | 移除 stale , resolved |
8+| **生命周期维护 (Issue)** | Stale 超期关闭 | 针对已被标记为 stale & resolved 的 Issue,若在 14 天内没有任何用户回复活动。 | 自动关闭(Close)Issue,清理积压的非活跃任务。 | closed |
9+| **交互闭环管理 (Issue)** | 等待回复预警 | Issue 带有 wait-feedback 标签且处于 Open 状态,负责人已回复但提单人超过 7 天未回复。 | 发布预警评论,提醒用户提供进一步信息,否则将暂时关闭 Issue。 | wait-feedback |
10+| **交互闭环管理 (Issue)** | 回复自动消标 | Issue 带有 wait-feedback 标签且处于 Open 状态,监测到提单人(Author)发布了最新回复。 | 自动移除 wait-feedback标签 | 移除 wait-feedback |
11+| **交互闭环管理 (Issue)** | 超期自动关闭 | 在发送预警评论后,若提单人继续保持沉默超过 14 天。 | 发布结项评论并自动关闭(Close)Issue。 | closed |
12+| **CLA 签署检查 (PR)** | 强制检查 CLA | 用户评论 `/check-cla` | 重新检查提交者 CLA 状态,根据结果添加 `ascend-cla/yes``ascend-cla/no` 标签。 | `ascend-cla/yes`, `ascend-cla/no` |
13+| **CLA 签署检查 (PR)** | 取消 CLA 标签 | 仓库管理员评论 `/cla cancel` | 强制删除 `ascend-cla/yes` 标签。 | 移除 `ascend-cla/yes` |
14+| **持续集成 (CI) (PR)** | 触发流水线 | 用户评论 `compile` | 触发 CodeArts 编译流水线,成功打 `ci-pipeline-passed`,失败打 `ci-pipeline-failed`。 | `ci-pipeline-passed`, `ci-pipeline-failed` |
15+| **持续集成 (CI) (PR)** | 前冒烟测试 | 用户评论 `system-test` | 针对 MindIE-SD 仓库触发前冒烟,成功打 `st-success`,失败打 `st-fail`。 | `st-success`, `st-fail` |
16+| **持续集成 (CI) (PR)** | 获取构建日志 | 用户评论 `get-log` | 针对 PTA 相关仓库获取构建状态,成功打 `ci-pipeline-passed`,失败打 `ci-pipeline-failed` 并提供日志。 | `ci-pipeline-passed`, `ci-pipeline-failed` |
17+| **持续集成 (CI) (PR)** | 重试流水线 | 用户评论 `retry` | 针对 PTA 相关仓库重试失败的流水线。 | `ci-pipeline-failed` |
18+| **持续集成 (CI) (PR)** | 停止流水线 | 用户评论 `stop` | 针对 PTA 相关仓库停止已触发的流水线,打 `ci-pipeline-failed` 标签。 | `ci-pipeline-failed` |
19+| **代码评审与合并 (PR)** | 评审通过/取消 | 用户评论 `/lgtm``/lgtm cancel` | 为 PR 添加或移除 `lgtm` 标签,代表代码已评审。 | `lgtm` |
20+| **代码评审与合并 (PR)** | 同意合并/取消 | 用户评论 `/approve``/approve cancel` | 为 PR 添加或移除 `approved` 标签,代表合入同意。 | `approved` |
21+| **代码评审与合并 (PR)** | 检查并合并 PR | 用户评论 `/check-pr` | 检查 PR 标签是否满足条件,若满足则执行合并。 | 合并 PR |
22+| **代码评审与合并 (PR)** | 守护者审核 | 用户评论 `/merge` | 为 PR 添加 `keeper_approved` 标签。 | `keeper_approved` |
23+| **通用标签管理 (Issue/PR)** | 标签增删 | 用户评论 `/kind`, `/priority`, `/sig` 等指令 | 为 Issue 或 PR 添加/移除对应的分类、优先级或 SIG 标签。 | `kind/**`, `priority/**`, `sig/**` |
24+| **负责人管理 (Issue)** | 指派/取消负责人 | 用户评论 `/assign``/unassign` | 为 Issue 指派或取消负责人。 | 指派状态 |
25+ 
26+ 
27+## 机器人Issue自动化处理流程图 (Workflow)
28+ 
29+### Rule 1: 已解决自动识别 (触发机制:定时任务)
30+```mermaid
31+graph LR
32+ R1_Start(已经关闭的issue) --> R1_Check{issue里关联了pr<br/>且pr已合入<br/>状态是DONE}
33+ R1_Check --> R1_Action[机器人补充resolved标签]
34+```
35+ 
36+### Rule 2: 闲置状态管理 - Resolved (触发机制:定时任务)
37+```mermaid
38+graph LR
39+ R2_Start(用户提出issue) --> R2_Resolve[责任人解决并标记resolved]
40+ R2_Resolve --> R2_Wait{用户无进一步回复<br/>7天}
41+ R2_Wait --> R2_Stale[机器人评论<br/>打stale标签]
42+
43+ R2_Stale --> R2_UserReply[用户回复]
44+ R2_UserReply --> R2_Recover[机器人去掉stale标签<br/>及resolved标签]
45+
46+ R2_Stale --> R2_NoReply{无人回复<br/>14天}
47+ R2_NoReply --> R2_Close[机器人关闭issue]
48+```
49+ 
50+### Rule 3: 交互闭环管理 - Wait Response (触发机制:定时任务)
51+```mermaid
52+graph LR
53+ R3_Start(用户提出issue) --> R3_WaitFeed[责任人评论并打标签<br/>wait-feedback]
54+
55+ R3_WaitFeed --> R3_UserReplyDirect[用户答复]
56+ R3_UserReplyDirect --> R3_RemoveWait[机器人去掉wait-feedback标签]
57+
58+ R3_WaitFeed --> R3_Wait{用户无进一步答复<br/>7天}
59+ R3_Wait --> R3_Stale[机器人评论<br/>]
60+
61+ R3_Stale --> R3_UserReplyStale[用户回复]
62+ R3_UserReplyStale --> R3_RecoverStale[机器人去掉wait-feedback标签]
63+
64+ R3_Stale --> R3_NoReply{无人回复<br/>14天}
65+ R3_NoReply --> R3_Close[机器人评论并关闭issue]
66+```
67+ 
68+**注意**: Rule1,Rule2,Rule3 只针对用户创建的Issue,不包括机器人自动生成的Issue。
69+ 
70+ 
71+## 规则新增与维护说明
72+### 机器人 Issue 自动处理规则
73+机器人 Issue 自动处理规则(包括标签名称、超时时间、评论内容及标题打标映射)统一在 [bot-issue-manage.yaml](../../config/bot-issue-manage.yaml) 配置文件中进行维护。
74+ 
75+- **配置项说明**:
76+ - **标签名称配置 (`label_***`)**:
77+ - `label_resolve`: 标识 Issue 已解决的标签。
78+ - `label_stale`: 标识 Issue 进入闲置状态的标签。
79+ - `label_wait_feedback`: 标识正在等待 Issue 提交者反馈的标签。
80+ - **超时天数配置 (`***_days`)**:
81+ - `resolve_to_stale_days`: 从 Issue 被打上 `resolved` 标签开始算起,到自动标记为 `stale` 之间允许的最大未更新天数。
82+ - `stale_to_close_days`: 从 Issue 被打上 `stale` 标签开始算起,到机器人自动执行关闭操作之间允许的最大未更新天数。
83+ - `wait_feedback_to_warn_days`: 当 Issue 带有 `wait-feedback` 标签且最后一条评论来自负责人时,到机器人发布超时预警评论之间允许的最大未更新天数。
84+ - `wait_feedback_to_close_days`: 当 Issue 带有 `wait-feedback` 标签且最后一条评论来自负责人时,到机器人自动执行关闭操作之间允许的最大未更新天数。
85+ - **评论模板配置 (`***_comment`)**:
86+ - `stale_comment`: 当 Issue 因长期未更新被标记为 `stale` 时,机器人自动发布的提示评论内容。
87+ - `wait_feedback_warn_comment`: 当等待用户反馈超时(达到预警天数)时,机器人发布的预警评论内容。
88+ - `wait_feedback_close_comment`: 当等待用户反馈严重超时(达到关闭天数)时,机器人关闭 Issue 时发布的结束评论内容。
89+- **新增规则步骤**:
90+ 1. **修改配置**: 在 [bot-issue-manage.yaml](../../config/bot-issue-manage.yaml)中按需新增映射或调整参数。
91+ 2. **提交 PR**: 将修改后的配置文件提交 PR 到对应代码仓。
92+ 3. **生效时间**: PR 合入后,机器人配置通常在每轮任务执行前自动刷新生效。
93+- **注意事项**:
94+ - 确保目标仓库中**已存在**配置的标签,否则机器人可能无法成功执行打标动作。
Mdocs/services.md+1-1
@@ -16,7 +16,7 @@
16| ------------- | ---------- | ------------------------------------------------------------------------------------- | ---------- | ---------------------- |16| ------------- | ---------- | ------------------------------------------------------------------------------------- | ---------- | ---------------------- |
17| 新建流水线 | NA | [使用指导](https://gitcode.com/cann/community/blob/master/contributor/repository/ci-guide.md) | [@tanghaoran7](https://gitcode.com/tanghaoran7) | <tanghaoran7@huawei.com> |17| 新建流水线 | NA | [使用指导](https://gitcode.com/cann/community/blob/master/contributor/repository/ci-guide.md) | [@tanghaoran7](https://gitcode.com/tanghaoran7) | <tanghaoran7@huawei.com> |
18| CLA 签署 | [跳转](https://clasign.osinfra.cn/sign/68cbd4a3dbabc050b436cdd4) | [使用指导](./cla/cla使用指南.md) | [@yajie_caroline](https://gitcode.com/yajie_caroline) | <chenyajie6@huawei.com> |18| CLA 签署 | [跳转](https://clasign.osinfra.cn/sign/68cbd4a3dbabc050b436cdd4) | [使用指导](./cla/cla使用指南.md) | [@yajie_caroline](https://gitcode.com/yajie_caroline) | <chenyajie6@huawei.com> |
19-| CANN-robot | NA | [使用指导](./robot/robot使用指南.md) | [@Coopermassaki](https://gitcode.com/Coopermassaki) | <fuyong29@h-partners.com> |19+| CANN-robot | NA | [使用指导](./robot/robot使用指南.md) / [robot能力列表.md](./robot/robot能力列表.md) | [@Coopermassaki](https://gitcode.com/Coopermassaki) | <fuyong29@h-partners.com> |
20| 社区邮件列表 | [跳转](https://mailweb.cann.osinfra.cn/) | [使用指导](./mail-list/邮件列表使用指南.md) | [@weixin_43493709](https://gitcode.com/weixin_43493709) | <zhuchao50@h-partners.com> |20| 社区邮件列表 | [跳转](https://mailweb.cann.osinfra.cn/) | [使用指导](./mail-list/邮件列表使用指南.md) | [@weixin_43493709](https://gitcode.com/weixin_43493709) | <zhuchao50@h-partners.com> |
21| 社区会议服务 | [跳转](https://meeting.osinfra.cn/cann) | [使用指导](./meeting/CANN社区会议指南.md) | [@ZeesangPie](https://gitcode.com/ZeesangPie) | <chenglang11@huawei.com> |21| 社区会议服务 | [跳转](https://meeting.osinfra.cn/cann) | [使用指导](./meeting/CANN社区会议指南.md) | [@ZeesangPie](https://gitcode.com/ZeesangPie) | <chenglang11@huawei.com> |
22| 漏洞管理服务 | NA | [使用指导](./cve-manager/manual.md) | [@yangwei999](https://gitcode.com/yangwei999) | <yangwei266@h-partners.com> |22| 漏洞管理服务 | NA | [使用指导](./cve-manager/manual.md) | [@yangwei999](https://gitcode.com/yangwei999) | <yangwei266@h-partners.com> |