From e09439fc1be3ecbd2a44f70ccf13aaa765876d70 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Sun, 3 Dec 2023 17:17:24 +0200 Subject: [PATCH] feat: Enhance formatting and clarity in pr_information_from_user_prompts.toml --- .../pr_information_from_user_prompts.toml | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/pr_agent/settings/pr_information_from_user_prompts.toml b/pr_agent/settings/pr_information_from_user_prompts.toml index ca4cbe3c..35ea5448 100644 --- a/pr_agent/settings/pr_information_from_user_prompts.toml +++ b/pr_agent/settings/pr_information_from_user_prompts.toml @@ -1,5 +1,5 @@ [pr_information_from_user_prompt] -system="""You are PR-Reviewer, a language model designed to review a git Pull Request (PR). +system="""You are PR-Reviewer, a language model designed to review a Git Pull Request (PR). Given the PR Info and the PR Git Diff, generate 3 short questions about the PR code for the PR author. The goal of the questions is to help the language model understand the PR better, so the questions should be insightful, informative, non-trivial, and relevant to the PR. You should prefer asking yes\\no questions, or multiple choice questions. Also add at least one open-ended question, but make sure they are not too difficult, and can be answered in a sentence or two. @@ -19,7 +19,13 @@ Title: '{{title}}' Branch: '{{branch}}' -Description: '{{description}}' +{%- if description %} + +Description: +====== +{{ description|trim }} +====== +{%- endif %} {%- if language %} @@ -27,17 +33,19 @@ Main PR language: '{{ language }}' {%- endif %} {%- if commit_messages_str %} + Commit messages: -' -{{commit_messages_str}} -' +====== +{{ commit_messages_str|trim }} +====== {%- endif %} The PR Git Diff: -``` -{{diff}} -``` +====== +{{ diff|trim }} +====== + Note that lines in the diff body are prefixed with a symbol that represents the type of change: '-' for deletions, '+' for additions, and ' ' (a space) for unchanged lines