Skip to content

Commit

Permalink
docs: Add README for commit command and update YAML
Browse files Browse the repository at this point in the history
- 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
yangbobo2021 authored and kagami-l committed Jul 19, 2024
1 parent 1a7a272 commit e03d1eb
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
30 changes: 30 additions & 0 deletions merico/commit/README.md
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生成的提交信息,并根据需要进行编辑,以确保信息准确反映了你的更改。
- 养成经常小批量提交的好习惯,这有助于更好地跟踪项目历史。
1 change: 1 addition & 0 deletions merico/commit/command.yml
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"

0 comments on commit e03d1eb

Please sign in to comment.