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
This commit is contained in:
bobo 2024-07-19 11:05:37 +08:00 committed by kagami
parent 1a7a272d08
commit e03d1eb5dd
2 changed files with 31 additions and 0 deletions

30
merico/commit/README.md Normal file
View File

@ -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生成的提交信息,并根据需要进行编辑,以确保信息准确反映了你的更改。
- 养成经常小批量提交的好习惯,这有助于更好地跟踪项目历史。

View File

@ -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"