diff --git a/pr_agent/settings/pr_description_prompts.toml b/pr_agent/settings/pr_description_prompts.toml index 7e93d9da..0a15eee3 100644 --- a/pr_agent/settings/pr_description_prompts.toml +++ b/pr_agent/settings/pr_description_prompts.toml @@ -1,14 +1,10 @@ [pr_description_prompt] system="""You are PR-Reviewer, a language model designed to review a Git Pull Request (PR). -{%- if enable_custom_labels %} -Your task is to provide a full description for the PR content - files walkthrough, title, type, description and labels. -{%- else %} -Your task is to provide a full description for the PR content - files walkthrough, title, type, and description. -{%- endif %} -- Focus on the new PR code (lines starting with '+'). +Your task is to provide a full description for the PR content - type, description, title and files walkthrough. +- Focus on the new PR code (lines starting with '+' in the 'PR Git Diff' section). - Keep in mind that the 'Previous title', 'Previous description' and 'Commit messages' sections may be partial, simplistic, non-informative or out of date. Hence, compare them to the PR diff code, and use them only as a reference. - The generated title and description should prioritize the most significant changes. -- If needed, each YAML output should be in block scalar indicator ('|-') +- If needed, each YAML output should be in block scalar indicator ('|') - When quoting variables, names or file paths from the code, use backticks (`) instead of single quote ('). {%- if extra_instructions %} @@ -39,7 +35,6 @@ class PRType(str, Enum): class FileDescription(BaseModel): filename: str = Field(description="The full file path of the relevant file") - language: str = Field(description="The programming language of the relevant file") {%- if include_file_summary_changes %} changes_summary: str = Field(description="concise summary of the changes in the relevant file, in bullet points (1-4 bullet points).") {%- endif %} @@ -49,11 +44,11 @@ class FileDescription(BaseModel): class PRDescription(BaseModel): type: List[PRType] = Field(description="one or more types that describe the PR content. Return the label member value (e.g. 'Bug fix', not 'bug_fix')") + description: str = Field(description="summarize the PR changes in up to four bullet points, each up to 8 words. For large PRs, add sub-bullets if needed. Order bullets by importance, with each bullet highlighting a key change group.") + title: str = Field(description="a concise and descriptive title that captures the PR's main theme") {%- if enable_semantic_files_types %} pr_files: List[FileDescription] = Field(max_items=20, description="a list of all the files that were changed in the PR, and summary of their changes. Each file must be analyzed regardless of change size.") {%- endif %} - description: str = Field(description="summarize the PR changes in up to four bullet points, each up to 8 words. Add sub-bullets if needed. Order bullets by importance, with each bullet highlighting a key change group.") - title: str = Field(description="a concise and descriptive title that captures the PR's main theme") ===== @@ -63,12 +58,14 @@ Example output: type: - ... - ... +description: | + ... +title: | + ... {%- if enable_semantic_files_types %} pr_files: - filename: | ... - language: | - ... {%- if include_file_summary_changes %} changes_summary: | ... @@ -79,10 +76,6 @@ pr_files: label_key_1 ... {%- endif %} -description: | - ... -title: | - ... ``` Answer should be a valid YAML, and nothing else. Each YAML output MUST be after a newline, with proper indent, and block scalar indicator ('|') @@ -130,7 +123,7 @@ Commit messages: {%- endif %} -The PR Diff: +The PR Git Diff: ===== {{ diff|trim }} =====