已合并
[Bug] 修复PR模板注释中#123被解析为真实issue引用导致PR创建失败 #8450
[Bug] 修复PR模板注释中#123被解析为真实issue引用导致PR创建失败 #8450
已合并
hsshuai创建于 6月22日
hsshuai成员
6月22日

Fixes #2284

修改描述 (Description)

问题原因: .gitcode/PULL_REQUEST_TEMPLATE.md 的 HTML 注释中包含了示例文本 Fixes #123 / #123。GitCode/AtomGit 平台会解析 HTML 注释内的 #123 作为真实 issue 引用,导致所有使用该模板创建的 PR 都被自动关联到 issue #123。当该 issue 累计超过 100 个 PR 关联后,平台会拒绝后续 PR 的创建,报错 "An issue cannot be linked to more than 100 PRs"。

修改内容: 将模板注释中的 #123 替换为 #<issue-id> 占位符,避免被平台解析为真实 issue 编号。

影响范围: 仅修改 PR 模板的注释文本,不影响任何代码逻辑。

修改类型 (Type of Change)

测试结果 (Test Results)

N/A — 模板注释文本修改,不涉及代码变更。修改后 #123 不再出现在模板中,平台不会自动关联 issue。

检查清单 (Checklist)

likedislike
Pull Request已成功合入, 合并人@MindSpore-Bot
(感谢 hsshuai 的贡献)
Hhsshuai成员
6月22日 创建了 pull request,commit be59e5d1
Hhsshuai成员
6月22日 关联了issue:无法生成策略文件,[Bug]: [严重bug] 创建PR时出现错误提示:"An issue 无法生成策略文件 cannot be linked to more than 100 PRs"
MindSpore-BotMindSpore-Bot成员
6月22日 添加了label:mindspore-cla/yes
MindSpore-Bot
MindSpore-Bot成员
6月22日 评论:

CLA Signature Pass

hss-shuai, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
司小南(机器人)
司小南(机器人)成员
6月22日 评论:

@hss-shuai, 当前/check-pr未通过,原因如下:

以下Pull Request描述检查项未通过:
存在不符合模板的选项: Bug 修复 (Bug fix)
存在不符合模板的选项: 新特性 (New feature)
存在不符合模板的选项: 文档更新 (Documentation update)
存在不符合模板的选项: 代码重构 (Refactoring)
存在不符合模板的选项: 性能优化 (Performance improvement)
存在不符合模板的选项: 其他 (Other)
存在不符合模板的选项: 我已自验过该功能/修复 (Self-checked)
存在不符合模板的选项: 我已通过了本地的单元测试 (Passed local UTs)
存在不符合模板的选项: (如适用) 我已更新了对应文档 (Updated documentation)
存在不符合模板的选项: (如适用) 我已添加了新的测试用例 (Added new tests)
部分检查项缺失 请重新使用模板
模板中'Test Plan and Test Result' 信息为空,请补充对应信息。

请修改好上述检查错误后,重新使用/check-pr触发检查。

likedislike
司小南(机器人)司小南(机器人)成员
6月22日 添加了label:pr-check-fail
Hhsshuai成员
6月22日 修改了pull request 的描述
hsshuai成员
6月22日 评论:

/retest

likedislike
MindSpore-BotMindSpore-Bot成员
6月22日 添加了label:SC-RUNNING
MindSpore-BotMindSpore-Bot成员
6月22日 添加了label:ci-pipeline-running
MindSpore-BotMindSpore-Bot成员
6月22日 删除了label:SC-RUNNING
MindSpore-BotMindSpore-Bot成员
6月22日 添加了label:SC-SUCC
MindSpore-Bot
MindSpore-Bot成员
6月22日 评论:
阶段 任务名 状态 详情
编码安全与规范检查 CodeCheck ✅ >>>
流水线 PR-pipeline_Mindformers-codecheck ✅ >>>
likedislike
atomgit-bot
atomgit-bot
6月22日 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
atomgit-bot
atomgit-bot
6月22日 评论:

已审查完整的 .gitcode/PULL_REQUEST_TEMPLATE.md 文件。该文件仅包含两处 #123 出现(第 2-3 行),均已被此次 diff 替换为 #<issue-id>。文件中不存在其他被遗漏的数字型 issue 引用。这是一个纯粹无害的模板注释文本替换,没有引入任何安全问题、危险命令或不当配置。


变更摘要

此 PR 修复了 .gitcode/PULL_REQUEST_TEMPLATE.md 模板中 HTML 注释内的 #123 被 GitCode/AtomGit 平台解析为真实 issue 引用的问题。由于平台会扫描注释内容并将 #123 自动关联到 issue #123,当该 issue 累积超过 100 个 PR 关联后,平台将拒绝后续 PR 创建。修复方式是将两处 #123 替换为明确的占位符 #<issue-id>,避免被平台错误解析。

主要改动

  • #123 替换为 #<issue-id>:将模板中文注释行中的 Fixes #123 改为 Fixes #<issue-id>,消除平台对注释内数字编号的误解析。
  • #123 替换为 #<issue-id>(英文注释):将模板英文注释行中的 Fixes #123 改为 Fixes #<issue-id>,与中文注释保持一致。

审查结论:.gitcode/PULL_REQUEST_TEMPLATE.md — 无问题。

likedislike
不准确?
MindSpore-BotMindSpore-Bot成员
6月22日 删除了label:ci-pipeline-running
MindSpore-BotMindSpore-Bot成员
6月22日 添加了label:ci-pipeline-passed
MindSpore-Bot
MindSpore-Bot成员
6月22日 评论:
流水线 PR-pipeline_Mindformers#1561 已完成
阶段 任务名 状态 详情
恶意代码检查 Antipoison_Mindformers ✅ >>>
编码安全与规范检查 CodeCheck_Pylint ✅ >>>
开源片段检查 SCA_Mindformers ✅ >>>
开发者测试 UT_Mindformers ✅ >>>
流水线 PR-pipeline_Mindformers ✅ >>>
likedislike
niujunhao成员
6月22日 评论:

/lgtm

likedislike
MindSpore-BotMindSpore-Bot成员
6月22日 添加了label:lgtm-alpha-junh
MindSpore-Bot
MindSpore-Bot成员
6月22日 评论:

Review Code Feedback

  • The label lgtm-alpha-junh was added to this pull request. It means that alpha-junh reviewed the code changes. 👋
Tips
  • If this pull request is not merged while all conditions are met, comment /check-pr to try again. 😄
likedislike
wjlflyer成员
6月22日 评论:

/lgtm
/approve

likedislike
MindSpore-BotMindSpore-Bot成员
6月22日 添加了label:approvedlgtm-wjlflyer
MindSpore-Bot
MindSpore-Bot成员
6月22日 评论:

Review Code Feedback

  • The label lgtm-wjlflyer, approved was added to this pull request. It means that wjlflyer reviewed the code changes. 👋
Tips
  • If this pull request is not merged while all conditions are met, comment /check-pr to try again. 😄
likedislike
MindSpore-BotMindSpore-Bot成员
6月22日 合入了pull request,合并节点 SHA:0298e9f28cb154b5a3bbbcd5304383840dd670b0