Skip to content

Commit

Permalink
feat: Add README files and update PR command structure
Browse files Browse the repository at this point in the history
- Add README.md for PR command and its subcommands
- Update command.yml files to include help references
- Modify requirements.txt to use pr_env branch
- Add configuration options for PR inline review
  • Loading branch information
yangbobo2021 committed Jul 19, 2024
1 parent d218bf7 commit 50e85ed
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 2 deletions.
34 changes: 34 additions & 0 deletions merico/pr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# pr 命令

pr命令是一个用于处理Pull Requests (PRs)的主命令。它本身不执行具体操作,而是通过子命令来完成特定功能。

## 可用子命令

1. pr.review - 生成PR代码评审描述
2. pr.improve - 生成PR的代码建议
3. pr.describe - 生成PR描述
4. pr.custom_suggestions - 生成PR的自定义代码建议

## 使用方法

要使用pr命令的功能,请使用以下格式调用相应的子命令:

/pr.<子命令> <PR_URL>

例如:
- /pr.review https://github.com/devchat-ai/devchat/pull/301
- /pr.improve https://github.com/devchat-ai/devchat/pull/301
- /pr.describe https://github.com/devchat-ai/devchat/pull/301
- /pr.custom_suggestions https://github.com/devchat-ai/devchat/pull/301

## 子命令说明

1. pr.review: 分析PR并生成代码评审描述,帮助审阅者快速了解PR的内容和影响。

2. pr.improve: 分析PR并提供代码改进建议,帮助开发者优化其代码。

3. pr.describe: 自动生成PR的描述,总结PR的主要变更和目的。

4. pr.custom_suggestions: 根据特定需求生成自定义的PR代码建议。

请根据您的具体需求选择适当的子命令。每个子命令都专注于PR处理的不同方面,帮助您更高效地管理和改进Pull Requests。
3 changes: 2 additions & 1 deletion merico/pr/command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ description: "pr command"
workflow_python:
env_name: devchat-pr-env4
version: 3.11.0
dependencies: requirements.txt
dependencies: requirements.txt
help: README.md
24 changes: 24 additions & 0 deletions merico/pr/config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# pr.config

**/pr.config命令用于配置Git工作流所需的设置。**


该命令允许用户配置以下选项:

1. PR Review Inline: 启用或禁用PR内联评审功能。

使用方式:
直接运行 /pr.config 命令,无需额外参数。

命令会引导用户通过交互式界面进行配置。用户可以选择是否启用PR内联评审功能。


配置文件位置:
全局配置文件保存在用户主目录下的 ~/.chat/.workflow_config.json


注意:
- 如需修改访问令牌或主机URL,请直接编辑配置文件。
- 配置更改后会立即生效。

这个命令可以帮助用户快速设置Git工作流所需的重要配置项,提高使用效率。
1 change: 1 addition & 0 deletions merico/pr/config/command.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
description: 'Config required settings for GIT workflows.'
help: README.md
steps:
- run: $devchat_python $command_path/command.py
1 change: 1 addition & 0 deletions merico/pr/custom_suggestions/command.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
description: "review pr"
input: required
help: README.md
steps:
- run: $workflow_python $command_path/../command.py "$input" custom_suggestions
1 change: 1 addition & 0 deletions merico/pr/describe/command.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
description: "review pr"
input: required
help: README.md
steps:
- run: $workflow_python $command_path/../command.py "$input" describe
2 changes: 1 addition & 1 deletion merico/pr/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
git+https://gitee.com/imlaji/pr-agent.git@ad276e206c7e462a689996ee3ada2769b35d5625
git+https://gitee.com/devchat-ai/devchat.git@main
git+https://gitee.com/devchat-ai/devchat.git@pr_env
1 change: 1 addition & 0 deletions merico/pr/review/command.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
description: "review pr"
input: required
help: README.md
steps:
- run: $workflow_python $command_path/../command.py "$input" review

0 comments on commit 50e85ed

Please sign in to comment.