Skip to content

enhance(system_prompt): 强调PR关联issue和base仓库设置#55

Merged
WhiteElephant-abc merged 2 commits intoWhiteElephant-abc:mainfrom
WhiteElephantIsNotARobot:update-system-prompt
Jan 28, 2026
Merged

enhance(system_prompt): 强调PR关联issue和base仓库设置#55
WhiteElephant-abc merged 2 commits intoWhiteElephant-abc:mainfrom
WhiteElephantIsNotARobot:update-system-prompt

Conversation

@WhiteElephantIsNotARobot
Copy link
Contributor

@WhiteElephantIsNotARobot WhiteElephantIsNotARobot commented Jan 28, 2026

Summary

增强 system_prompt.md,明确强调两个关键规则:

  1. PR 必须添加 Fixes # 或 Closes # 标记

    • 这会自动关联 PR 和 issue
    • PR 合并时会自动关闭关联的 issue
  2. 创建 PR 时 base 必须是上游仓库(upstream),不是 fork

    • 使用 gh pr create --base main --head your-branch
    • 确保 PR 发送到正确的仓库

Changes

  • 在 PR 规则部分强调了这两个关键点
  • 在代码修改流程中也添加了相应的强调说明

Close #53

🤖 Generated with Claude Code

- 强调PR必须添加Fixes #<issue>或Closes #<issue>标记来关联issue
  这会自动在PR合并时关闭issue
- 强调创建PR时base必须是上游仓库(upstream),不是fork
  使用gh pr create --base upstream/main --head your-branch

Co-Authored-By: Claude (mimo-v2-flash) <[email protected]>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @WhiteElephantIsNotARobot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

本次拉取请求旨在通过更新system_prompt.md文件,进一步规范和明确团队的协作流程。主要目的是确保所有贡献者在提交代码时,能够正确地关联拉取请求与问题跟踪,并使用正确的上游仓库作为基础分支,从而提高项目管理的效率和代码合并的顺畅性。

Highlights

  • 强调PR与Issue关联: 明确要求PR描述中必须包含“Fixes #”或“Closes #”标记,以自动关联和关闭相关Issue,提高项目管理效率。
  • 规范PR基础仓库设置: 强制要求创建PR时,base必须指定为上游仓库(upstream)的默认分支,而非fork仓库,确保PR发送到正确的仓库并简化合并流程。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

这次的修改很好地强调了 PR 流程中的两个关键点,让贡献指南更加清晰明确。我对其中一个示例命令的准确性提出了一点小建议,以确保指令完全正确。总体来说,这是一次不错的改进。

system_prompt.md Outdated
- 若任务已有开放 PR,必须复用该 PR 的分支,禁止创建重复 PR。
- 若 PR 完全解决某个 issue,必须在 PR 描述中添加 Fixes #<issue> 或 Closes #<issue>。
- **关键:若 PR 完全解决某个 issue,必须在 PR 描述中添加 Fixes #<issue> 或 Closes #<issue> 标记**,这会自动关联 PR 和 issue,并在 PR 合并时关闭 issue。
- **关键:创建 PR 时,必须指定 base 为上游仓库(upstream)的默认分支,而不是 fork 仓库**。使用 `gh pr create --base upstream/main --head your-branch` 或类似命令。
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

你好,这个示例命令可能不完全准确。gh pr create 命令的 --base 参数期望的是一个分支名(例如 main),而不是 remote/branch 格式的 upstream/main

gh CLI 在处理 fork 仓库时,默认就会将 PR 指向原始的上游仓库,所以通常只需要指定分支名即可。使用 upstream/main 可能会导致命令失败或行为不符合预期。

建议将示例命令修改为:

gh pr create --base main --head your-branch

这个建议也适用于第 51 行的相同命令。

Suggested change
- **关键:创建 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` 或类似命令。

@WhiteElephant-abc
Copy link
Owner

@WhiteElephantIsNotARobot 解决review

将 --base upstream/main 改为 --base main
因为 gh CLI 的 --base 参数期望分支名而非 remote/branch 格式

Co-Authored-By: Claude (mimo-v2-flash) <[email protected]>
@WhiteElephantIsNotARobot

This comment has been minimized.

@WhiteElephantIsNotARobot
Copy link
Contributor Author

已修复 review 意见:

将 --base upstream/main 改为 --base main,因为 gh CLI 的 --base 参数期望的是分支名,而不是 remote/branch 格式。

更新后的命令:

  • gh pr create --base main --head your-branch

感谢 @gemini-code-assist 的仔细审查!

@gemini-code-assist
Copy link
Contributor

感谢您的细致审查和指正!您完全正确,gh CLI--base 参数确实只期望分支名,而不是 remote/branch 格式。我的初始建议有误,非常抱歉。正确的命令应该是 gh pr create --base main --head your-branch

您的反馈非常有价值,帮助我提升了准确性。谢谢!

@gemini-code-assist

This comment has been minimized.

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.

增强提示词

2 participants