From 61522a8537dc5b72700e69f7dedcb76dc704192c Mon Sep 17 00:00:00 2001 From: WhiteElephantIsNotARobot <257136373+WhiteElephantIsNotARobot@users.noreply.github.com> Date: Wed, 28 Jan 2026 14:26:00 +0000 Subject: [PATCH 1/2] =?UTF-8?q?enhance(system=5Fprompt):=20=E5=BC=BA?= =?UTF-8?q?=E8=B0=83PR=E5=85=B3=E8=81=94issue=E5=92=8Cbase=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 强调PR必须添加Fixes #或Closes #标记来关联issue 这会自动在PR合并时关闭issue - 强调创建PR时base必须是上游仓库(upstream),不是fork 使用gh pr create --base upstream/main --head your-branch Co-Authored-By: Claude (mimo-v2-flash) --- system_prompt.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/system_prompt.md b/system_prompt.md index f1daae0..769a567 100644 --- a/system_prompt.md +++ b/system_prompt.md @@ -19,7 +19,8 @@ PR 规则: - 若任务需要代码修改且涉及跨仓库协作,必须创建 PR。 - 若任务已有开放 PR,必须复用该 PR 的分支,禁止创建重复 PR。 -- 若 PR 完全解决某个 issue,必须在 PR 描述中添加 Fixes # 或 Closes #。 +- **关键:若 PR 完全解决某个 issue,必须在 PR 描述中添加 Fixes # 或 Closes # 标记**,这会自动关联 PR 和 issue,并在 PR 合并时关闭 issue。 +- **关键:创建 PR 时,必须指定 base 为上游仓库(upstream)的默认分支,而不是 fork 仓库**。使用 `gh pr create --base upstream/main --head your-branch` 或类似命令。 - 删除分支前必须确认该分支不是任何开放 PR 的 head 分支。 - 删除仓库前必须确认不存在开放 PR、未完成任务,并且用户明确授权。 @@ -42,12 +43,13 @@ issue / discussion 规则: 代码修改流程: 1. 检查是否存在相关分支或 PR。 2. 若需要写操作:fork 并 clone fork。 -3. 配置 upstream。 -4. 创建或切换分支。 +3. 配置 upstream(必须配置 upstream remote 指向原始上游仓库)。 +4. 创建或切换分支(基于 upstream 默认分支创建)。 5. 修改代码。 6. 测试/构建。 -7. commit + push。 -8. 根据任务需要决定是否创建 PR。 +7. commit + push(推送到 fork)。 +8. **关键:创建 PR 时,base 必须是上游仓库(upstream),不是 fork**。使用 `gh pr create --base upstream/main --head your-branch`。 +9. **关键:若 PR 解决了某个 issue,在 PR 描述中添加 Fixes # 或 Closes #**。 PR 审查规则: - 使用 gh pr view / gh pr diff 获取内容。 From 3646dca22b5d903cd99b9e3766521392d8c8ce6c Mon Sep 17 00:00:00 2001 From: WhiteElephantIsNotARobot <257136373+WhiteElephantIsNotARobot@users.noreply.github.com> Date: Wed, 28 Jan 2026 17:00:36 +0000 Subject: [PATCH 2/2] =?UTF-8?q?fix(system=5Fprompt):=20=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=20gh=20pr=20create=20=E5=91=BD=E4=BB=A4=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 --base upstream/main 改为 --base main 因为 gh CLI 的 --base 参数期望分支名而非 remote/branch 格式 Co-Authored-By: Claude (mimo-v2-flash) --- system_prompt.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system_prompt.md b/system_prompt.md index 769a567..d2a8869 100644 --- a/system_prompt.md +++ b/system_prompt.md @@ -20,7 +20,7 @@ PR 规则: - 若任务需要代码修改且涉及跨仓库协作,必须创建 PR。 - 若任务已有开放 PR,必须复用该 PR 的分支,禁止创建重复 PR。 - **关键:若 PR 完全解决某个 issue,必须在 PR 描述中添加 Fixes # 或 Closes # 标记**,这会自动关联 PR 和 issue,并在 PR 合并时关闭 issue。 -- **关键:创建 PR 时,必须指定 base 为上游仓库(upstream)的默认分支,而不是 fork 仓库**。使用 `gh pr create --base upstream/main --head your-branch` 或类似命令。 +- **关键:创建 PR 时,base 必须是上游仓库(upstream),不是 fork**。使用 `gh pr create --base main --head your-branch` 或类似命令。 - 删除分支前必须确认该分支不是任何开放 PR 的 head 分支。 - 删除仓库前必须确认不存在开放 PR、未完成任务,并且用户明确授权。 @@ -48,7 +48,7 @@ issue / discussion 规则: 5. 修改代码。 6. 测试/构建。 7. commit + push(推送到 fork)。 -8. **关键:创建 PR 时,base 必须是上游仓库(upstream),不是 fork**。使用 `gh pr create --base upstream/main --head your-branch`。 +8. **关键:创建 PR 时,base 必须是上游仓库(upstream),不是 fork**。使用 `gh pr create --base main --head your-branch`。 9. **关键:若 PR 解决了某个 issue,在 PR 描述中添加 Fixes # 或 Closes #**。 PR 审查规则: