mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 20:30:41 +08:00
feat: Enhance readability in toml files and add verbosity level logging in pr_generate_labels.py
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
[pr_custom_labels_prompt]
|
||||
system="""You are CodiumAI-PR-Reviewer, a language model designed to review git Pull Requests (PR).
|
||||
system="""You are CodiumAI-PR-Reviewer, a language model designed to review a git Pull Request (PR).
|
||||
Your task is to provide labels that describe the PR content.
|
||||
{%- if enable_custom_labels %}
|
||||
Thoroughly read the labels name and the provided description, and decide whether the label is relevant to the PR.
|
||||
@ -46,9 +46,13 @@ Answer should be a valid YAML, and nothing else.
|
||||
"""
|
||||
|
||||
user="""PR Info:
|
||||
|
||||
Previous title: '{{title}}'
|
||||
Previous description: '{{description}}'
|
||||
Branch: '{{branch}}'
|
||||
|
||||
Branch: '{{ branch }}'
|
||||
|
||||
Description: '{{ description }}'
|
||||
|
||||
{%- if language %}
|
||||
|
||||
Main PR language: '{{ language }}'
|
||||
|
@ -1,6 +1,6 @@
|
||||
[pr_description_prompt]
|
||||
system="""You are CodiumAI-PR-Reviewer, a language model designed to review git pull requests.
|
||||
Your task is to provide full description of a Pull Request (PR) content.
|
||||
system="""You are CodiumAI-PR-Reviewer, a language model designed to review a git Pull Request (PR).
|
||||
Your task is to provide full description of a Pr content.
|
||||
- Make sure to focus on the new PR code (the '+' lines).
|
||||
- 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.
|
||||
- Prioritize the most significant changes first, followed by the minor ones.
|
||||
@ -71,7 +71,10 @@ user="""PR Info:
|
||||
|
||||
Previous title: '{{title}}'
|
||||
|
||||
Previous description: '{{description}}'
|
||||
{%- if description %}
|
||||
|
||||
Previous description: '{{ description }}'
|
||||
{%- endif %}
|
||||
|
||||
Branch: '{{branch}}'
|
||||
{%- if language %}
|
||||
@ -91,6 +94,8 @@ The PR Git Diff:
|
||||
```
|
||||
{{diff}}
|
||||
```
|
||||
|
||||
|
||||
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.
|
||||
|
||||
Response (should be a valid YAML, and nothing else):
|
||||
|
@ -215,6 +215,8 @@ The PR Git Diff:
|
||||
```
|
||||
{{diff}}
|
||||
```
|
||||
|
||||
|
||||
Note that lines in the diff body are prefixed with a symbol that represents the type of change: '-' for deletions, '+' for additions. Focus on the '+' lines.
|
||||
|
||||
Response (should be a valid YAML, and nothing else):
|
||||
|
@ -147,6 +147,9 @@ class PRGenerateLabels:
|
||||
user=user_prompt
|
||||
)
|
||||
|
||||
if get_settings().config.verbosity_level >= 2:
|
||||
get_logger().info(f"\nAI response:\n{response}")
|
||||
|
||||
return response
|
||||
|
||||
def _prepare_data(self):
|
||||
|
Reference in New Issue
Block a user