Skip to content

docs: 添加 PR 规范#42

Open
Watanabehato wants to merge 2 commits into
MaaXYZ:mainfrom
Watanabehato:docs/pr-guidelines
Open

docs: 添加 PR 规范#42
Watanabehato wants to merge 2 commits into
MaaXYZ:mainfrom
Watanabehato:docs/pr-guidelines

Conversation

@Watanabehato
Copy link
Copy Markdown

@Watanabehato Watanabehato commented Jun 3, 2026

关联 Issue

无,补充模板仓库的协作规范。

变更摘要

  • 新增 docs/zh_cn/develop/pull_request_guidelines.md,说明 PR 标题、描述、验证记录与评审要求
  • 新增 .github/PULL_REQUEST_TEMPLATE.md,引导贡献者填写关联 Issue、摘要和验证记录
  • README.mdhow_to_develop.md 中加入 PR 规范入口

验证

  • 执行 git diff --check
  • 检查新增文档与入口链接路径存在

截图 / 日志 / 说明

纯文档改动,无截图。

Summary by Sourcery

在整个项目中引入统一的 Pull Request 贡献指南,并将其接入各个仓库入口。

Documentation(文档):

  • 新增一份详细的中文 PR 指南文档,涵盖分支命名规范、标题与描述要求、验证步骤以及评审期望等内容。
  • 在主 README 和开发指南中加入指向新 PR 指南的链接,使贡献者可以方便地找到并阅读。

Chores(杂务/日常维护):

  • 新增一个 GitHub Pull Request 模板,引导贡献者提供关联 issue 链接、变更摘要、验证记录,以及对 PR 指南的引用。
Original summary in English

Summary by Sourcery

Introduce project-wide pull request contribution guidelines and wire them into the repository entry points.

Documentation:

  • Add a detailed Chinese PR guideline document covering branch conventions, titles, descriptions, validation, and review expectations.
  • Link the new PR guidelines from the main README and development guide to surface them to contributors.

Chores:

  • Add a GitHub pull request template that guides contributors to provide issue links, change summaries, validation records, and references to the PR guidelines.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你好——我发现了 1 个问题

给 AI Agent 的提示
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path=".github/PULL_REQUEST_TEMPLATE.md" line_range="3-12" />
<code_context>
+# Pull Request
+
+提交前请阅读 [PR 规范](docs/zh_cn/develop/pull_request_guidelines.md)+
+## 关联 Issue
+
+<!-- Closes #123 / Fixes #123 / Related #123;没有 Issue 时请说明需求来源。 -->
+
+## 变更摘要
+
+<!-- 用 2~5 条 bullet 说明改了什么。 -->
+
+## 验证
+
+<!-- 请写清楚执行了什么验证、结果如何。不要只写“已测试”。 -->
+
+- [ ] 我已阅读并遵守 [PR 规范](docs/zh_cn/develop/pull_request_guidelines.md)
+
+## 截图 / 日志 / 说明
</code_context>
<issue_to_address>
**issue (bug_risk):** PR 模板中的相对链接路径会指向错误位置,建议改为从 `.github` 目录返回上一级后再进入 `docs`。

由于 `PULL_REQUEST_TEMPLATE.md` 位于 `.github` 目录下,`docs/zh_cn/develop/pull_request_guidelines.md` 会被当作 `.github/docs/...` 解析并导致 404。建议将两处链接都改为 `../docs/zh_cn/develop/pull_request_guidelines.md`,以便在 GitHub 页面中能正常跳转。
</issue_to_address>

Sourcery 对开源项目永久免费——如果你觉得我们的 Review 有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈改进后续的 Review。
Original comment in English

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path=".github/PULL_REQUEST_TEMPLATE.md" line_range="3-12" />
<code_context>
+# Pull Request
+
+提交前请阅读 [PR 规范](docs/zh_cn/develop/pull_request_guidelines.md)+
+## 关联 Issue
+
+<!-- Closes #123 / Fixes #123 / Related #123;没有 Issue 时请说明需求来源。 -->
+
+## 变更摘要
+
+<!-- 用 2~5 条 bullet 说明改了什么。 -->
+
+## 验证
+
+<!-- 请写清楚执行了什么验证、结果如何。不要只写“已测试”。 -->
+
+- [ ] 我已阅读并遵守 [PR 规范](docs/zh_cn/develop/pull_request_guidelines.md)
+
+## 截图 / 日志 / 说明
</code_context>
<issue_to_address>
**issue (bug_risk):** PR 模板中的相对链接路径会指向错误位置,建议改为从 `.github` 目录返回上一级后再进入 `docs`。

由于 `PULL_REQUEST_TEMPLATE.md` 位于 `.github` 目录下,`docs/zh_cn/develop/pull_request_guidelines.md` 会被当作 `.github/docs/...` 解析并导致 404。建议将两处链接都改为 `../docs/zh_cn/develop/pull_request_guidelines.md`,以便在 GitHub 页面中能正常跳转。
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread .github/PULL_REQUEST_TEMPLATE.md Outdated
@Watanabehato
Copy link
Copy Markdown
Author

已采纳:.github/PULL_REQUEST_TEMPLATE.md 中两处 PR 规范链接都已改为 ../docs/zh_cn/develop/pull_request_guidelines.md,避免从 .github 目录解析到错误路径。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant