-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore(tools): add AI prompt for automated comments, git commit and push codes #4655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds two GitHub prompt files intended to standardize (1) automated git commit/push behavior and (2) source-code comment update workflows.
Changes:
- Added a prompt for analyzing diffs and generating standardized commit messages, then performing git add/commit/push.
- Added a prompt describing rules and a task-file workflow for systematically updating source code comments.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .github/prompts/gf.commit-push.prompt.md | Defines an automated workflow for commit message generation and git add/commit/push operations. |
| .github/prompts/gf.update-comments.prompt.md | Defines guidelines and a task-file based process for updating and tracking comment improvements. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - 源码仓库目录地址为:${fileDirname}/../.. | ||
| - 检索当前仓库源码的所有代码文件,按照组件维度进行分类整理,整理成类似于以下任务形式,以便于后续按照任务形式处理源码文件: |
Copilot
AI
Jan 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${fileDirname} is used as if it’s a supported prompt variable, but it’s not defined/used anywhere else in the repo. If the prompt runner doesn’t expand it, these paths will be confusing or wrong. Consider replacing with a concrete repo-relative path (e.g., “repo root”) or explicitly documenting what ${fileDirname} is expected to resolve to (and for which runtime).
| 5. **相关 Issue**: | ||
| - 如果有对应的 issue,在 commit message body 中添加 `Fixes #1234` 或 `Updates #1234` | ||
| - 完全修复使用 `Fixes`,部分修复使用 `Updates` |
Copilot
AI
Jan 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The prompt instructs adding Fixes #... / Updates #... in the commit message body, but this repo’s PR template asks contributors to add that reference to the PR description/comment instead (.github/PULL_REQUEST_TEMPLATE.MD:20-21). To avoid conflicting guidance, align this section with the PR template (or explicitly state where the repo expects issue references).
|
不是走向世界么?怎么用纯中文提示词 |
我关掉了,先自己测试下,没问题再提交。 |
This pull request adds two new prompt files to standardize and automate important development workflows: one for generating commit messages and handling git operations, and another for updating and maintaining code comments. These prompts are designed to improve code quality, maintainability, and team efficiency by providing clear, step-by-step guidelines and automating repetitive tasks.
Git Commit & Push Automation:
.github/prompts/gf.commit-push.prompt.md, a comprehensive prompt that guides the automated analysis of branch changes, generation of standardized commit messages, and execution of git add, commit, and push operations. It includes detailed commit message conventions, step-by-step git workflow instructions, and quality checks for commit messages.Source Code Comment Update Guidelines:
.github/prompts/gf.update-comments.prompt.md, which outlines best practices and requirements for updating and supplementing source code comments. The prompt covers ensuring completeness, accuracy, and consistency of comments, as well as strategies for organizing and tracking comment update tasks by component and version.