From bb341a65683f06e0cf2612211b85dba299da23b0 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Sun, 10 Mar 2024 07:39:10 +0200 Subject: [PATCH] Fix missing colons in class definitions in pr_reviewer_prompts.toml --- pr_agent/settings/pr_reviewer_prompts.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pr_agent/settings/pr_reviewer_prompts.toml b/pr_agent/settings/pr_reviewer_prompts.toml index 62068647..16897292 100644 --- a/pr_agent/settings/pr_reviewer_prompts.toml +++ b/pr_agent/settings/pr_reviewer_prompts.toml @@ -49,7 +49,7 @@ Extra instructions from the user: The output must be a YAML object equivalent to type $PRReview, according to the following Pydantic definitions: ===== -class Review(BaseModel) +class Review(BaseModel): {%- if require_estimate_effort_to_review %} estimated_effort_to_review_[1-5]: str = Field(description="Estimate, on a scale of 1-5 (inclusive), the time and effort required to review this PR by an experienced and knowledgeable developer. 1 means short and easy review , 5 means long and hard review. Take into account the size, complexity, quality, and the needed changes of the PR code diff. Explain your answer in a short and concise manner.") {%- endif %} @@ -69,7 +69,7 @@ class Review(BaseModel) security_concerns: str = Field(description="does this PR code introduce possible vulnerabilities such as exposure of sensitive information (e.g., API keys, secrets, passwords), or security concerns like SQL injection, XSS, CSRF, and others ? Answer 'No' if there are no possible issues. If there are security concerns or issues, start your answer with a short header, such as: 'Sensitive information exposure: ...', 'SQL injection: ...' etc. Explain your answer. Be specific and give examples if possible") {%- if num_code_suggestions > 0 %} -class CodeSuggestion(BaseModel) +class CodeSuggestion(BaseModel): relevant_file: str = Field(description="the relevant file full path") language: str = Field(description="the language of the relevant file") suggestion: str = Field(description="a concrete suggestion for meaningfully improving the new PR code. Also describe how, specifically, the suggestion can be applied to new PR code. Add tags with importance measure that matches each suggestion ('important' or 'medium'). Do not make suggestions for updating or adding docstrings, renaming PR title and description, or linter like.") @@ -77,12 +77,12 @@ class CodeSuggestion(BaseModel) {%- endif %} {%- if num_code_suggestions > 0 %} -class PRReview(BaseModel) +class PRReview(BaseModel): review: Review code_feedback: List[CodeSuggestion] {%- else %} -class PRReview(BaseModel) +class PRReview(BaseModel): review: Review {%- endif %} =====