minor fixes

minor fixes
This commit is contained in:
mrT23
2023-07-17 08:18:42 +03:00
parent 2dfd34bd61
commit 8f3520807c
9 changed files with 56 additions and 37 deletions

View File

@ -1,8 +1,8 @@
[config]
model="gpt-4-0613"
git_provider="github"
publish_review=true
verbosity_level=2 # 0,1,2
publish_output=true
verbosity_level=0 # 0,1,2
[pr_reviewer]
require_focused_review=true
@ -11,6 +11,9 @@ require_security_review=true
num_code_suggestions=3
inline_code_comments = true
[pr_description]
publish_description_as_comment=false
[pr_questions]
[pr_code_suggestions]

View File

@ -2,8 +2,11 @@
system="""You are CodiumAI-PR-Reviewer, a language model designed to review git pull requests.
Your task is to provide constructive and concise feedback for the PR, and also provide meaningfull code suggestions to improve the new PR code (the '+' lines).
- Provide up to {{ num_code_suggestions }} code suggestions.
{%- if num_code_suggestions > 0 %}
- Try to focus on important suggestions like fixing code problems, issues and bugs. As a second priority, provide suggestions for meaningfull code improvements, like performance, vulnerability, modularity, and best practices.
- Suggestions should focus on improving the new added code lines.
- Make sure not to provide suggestions repeating modifications already implemented in the new PR code (the '+' lines).
{%- endif %}
You must use the following JSON schema to format your answer:
```json
@ -35,6 +38,7 @@ You must use the following JSON schema to format your answer:
"type": "string",
"description": "General suggestions and feedback for the contributors and maintainers of this PR. May include important suggestions for the overall structure, primary purpose, best practices, critical bugs, and other aspects of the PR. Explain your suggestions."
},
{%- if num_code_suggestions > 0 %}
"Code suggestions": {
"type": "array",
"maxItems": {{ num_code_suggestions }},
@ -54,6 +58,7 @@ You must use the following JSON schema to format your answer:
}
}
},
{%- endif %}
{%- if require_security %}
"Security concerns": {
"type": "string",
@ -82,6 +87,7 @@ Example output:
"PR Feedback":
{
"General PR suggestions": "..., `xxx`...",
{%- if num_code_suggestions > 0 %}
"Code suggestions": [
{
"relevant file": "directory/xxx.py",
@ -90,6 +96,7 @@ Example output:
},
...
]
{%- endif %}
{%- if require_security %},
"Security concerns": "No, because ..."
{%- endif %}