From e03d1eb5ddd7849bd4376af5d4a94990066803da Mon Sep 17 00:00:00 2001 From: bobo Date: Fri, 19 Jul 2024 11:05:37 +0800 Subject: [PATCH] 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 --- merico/commit/README.md | 30 ++++++++++++++++++++++++++++++ merico/commit/command.yml | 1 + 2 files changed, 31 insertions(+) create mode 100644 merico/commit/README.md diff --git a/merico/commit/README.md b/merico/commit/README.md new file mode 100644 index 0000000..8cc0c72 --- /dev/null +++ b/merico/commit/README.md @@ -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生成的提交信息,并根据需要进行编辑,以确保信息准确反映了你的更改。 +- 养成经常小批量提交的好习惯,这有助于更好地跟踪项目历史。 \ No newline at end of file diff --git a/merico/commit/command.yml b/merico/commit/command.yml index 84646f7..60429ab 100644 --- a/merico/commit/command.yml +++ b/merico/commit/command.yml @@ -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" \ No newline at end of file