mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 21:30:40 +08:00
feat: add example output duplication option for PR review prompts
This commit is contained in:
@ -158,6 +158,7 @@ pr_files:
|
|||||||
...
|
...
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
```
|
```
|
||||||
|
(replace '...' with the actual values)
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
Response (should be a valid YAML, and nothing else):
|
Response (should be a valid YAML, and nothing else):
|
||||||
|
@ -221,6 +221,59 @@ The PR code diff:
|
|||||||
======
|
======
|
||||||
|
|
||||||
|
|
||||||
|
{%- if duplicate_prompt_examples %}
|
||||||
|
|
||||||
|
|
||||||
|
Example output:
|
||||||
|
```yaml
|
||||||
|
review:
|
||||||
|
{%- if related_tickets %}
|
||||||
|
ticket_compliance_check:
|
||||||
|
- ticket_url: |
|
||||||
|
...
|
||||||
|
ticket_requirements: |
|
||||||
|
...
|
||||||
|
fully_compliant_requirements: |
|
||||||
|
...
|
||||||
|
not_compliant_requirements: |
|
||||||
|
...
|
||||||
|
overall_compliance_level: |
|
||||||
|
...
|
||||||
|
{%- endif %}
|
||||||
|
{%- if require_estimate_effort_to_review %}
|
||||||
|
estimated_effort_to_review_[1-5]: |
|
||||||
|
3
|
||||||
|
{%- endif %}
|
||||||
|
{%- if require_score %}
|
||||||
|
score: 89
|
||||||
|
{%- endif %}
|
||||||
|
relevant_tests: |
|
||||||
|
No
|
||||||
|
key_issues_to_review:
|
||||||
|
- relevant_file: |
|
||||||
|
...
|
||||||
|
issue_header: |
|
||||||
|
...
|
||||||
|
issue_content: |
|
||||||
|
...
|
||||||
|
start_line: ...
|
||||||
|
end_line: ...
|
||||||
|
- ...
|
||||||
|
security_concerns: |
|
||||||
|
No
|
||||||
|
{%- if require_can_be_split_review %}
|
||||||
|
can_be_split:
|
||||||
|
- relevant_files:
|
||||||
|
- ...
|
||||||
|
- ...
|
||||||
|
title: ...
|
||||||
|
- ...
|
||||||
|
{%- endif %}
|
||||||
|
```
|
||||||
|
(replace '...' with the actual values)
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
|
||||||
Response (should be a valid YAML, and nothing else):
|
Response (should be a valid YAML, and nothing else):
|
||||||
```yaml
|
```yaml
|
||||||
"""
|
"""
|
||||||
|
@ -94,6 +94,7 @@ class PRReviewer:
|
|||||||
"enable_custom_labels": get_settings().config.enable_custom_labels,
|
"enable_custom_labels": get_settings().config.enable_custom_labels,
|
||||||
"is_ai_metadata": get_settings().get("config.enable_ai_metadata", False),
|
"is_ai_metadata": get_settings().get("config.enable_ai_metadata", False),
|
||||||
"related_tickets": get_settings().get('related_tickets', []),
|
"related_tickets": get_settings().get('related_tickets', []),
|
||||||
|
'duplicate_prompt_examples': get_settings().config.get('duplicate_prompt_examples', False),
|
||||||
}
|
}
|
||||||
|
|
||||||
self.token_handler = TokenHandler(
|
self.token_handler = TokenHandler(
|
||||||
|
Reference in New Issue
Block a user