-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add README for commit command and update YAML
- Add README.md explaining usage and steps of commit command - Include optional issue closing feature in README - Update command.yml to reference new README.md for help
- Loading branch information
1 parent
1a7a272
commit e03d1eb
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Commit 命令 | ||
|
||
该命令用于为选中的代码更改编写格式良好的提交信息,并通过Git提交这些更改。 | ||
|
||
## 用法 | ||
/commit [to close #issue_number] | ||
|
||
|
||
## 说明 | ||
|
||
- 该命令会引导你完成以下步骤: | ||
|
||
1. 选择要包含在本次提交中的修改文件 | ||
2. 查看并编辑AI生成的提交信息 | ||
3. 确认并执行Git提交 | ||
|
||
- 你可以选择性地在命令中包含要关闭的issue编号,例如: | ||
|
||
/commit to close #12 | ||
|
||
|
||
- 如果不指定issue编号,命令仍会正常执行,只是不会在提交信息中包含关闭issue的引用。 | ||
|
||
- 该命令会调用Git来执行实际的提交操作,因此请确保你的系统中已正确安装并配置了Git。 | ||
|
||
## 提示 | ||
|
||
- 在执行该命令之前,请确保你已经对要提交的文件进行了必要的修改。 | ||
- 仔细检查AI生成的提交信息,并根据需要进行编辑,以确保信息准确反映了你的更改。 | ||
- 养成经常小批量提交的好习惯,这有助于更好地跟踪项目历史。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
description: 'Writes a well-formatted commit message for selected code changes and commits them via Git. Include an issue number if desired (e.g., input "/commit to close #12").' | ||
hint: to close Issue #issue_number | ||
input: optional | ||
help: README.md | ||
steps: | ||
- run: $devchat_python $command_path/commit.py "$input" |