feat: add support for PR changes diagram in PR description

This commit is contained in:
mrT23
2025-05-25 09:38:23 +03:00
parent 511f1ba6ae
commit 7273c9c0c1
3 changed files with 22 additions and 0 deletions

View File

@ -104,6 +104,7 @@ enable_pr_type=true
final_update_message = true
enable_help_text=false
enable_help_comment=true
enable_pr_diagram=false # adds a section with a diagram of the PR changes
# describe as comment
publish_description_as_comment=false
publish_description_as_comment_persistent=true

View File

@ -49,6 +49,9 @@ class PRDescription(BaseModel):
{%- 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 %}
{%- if enable_pr_diagram %}
changes_diagram: str = Field(description="a horizontal diagram that represents the main PR changes, in the format of a mermaid flowchart. The diagram should be concise and easy to read. Leave empty if no diagram is relevant.")
{%- endif %}
=====
@ -76,6 +79,12 @@ pr_files:
label_key_1
...
{%- endif %}
{%- if enable_pr_diagram %}
changes_diagram: |
```mermaind
...
```
{%- endif %}
```
Answer should be a valid YAML, and nothing else. Each YAML output MUST be after a newline, with proper indent, and block scalar indicator ('|')
@ -157,6 +166,12 @@ pr_files:
label_key_1
...
{%- endif %}
{%- if enable_pr_diagram %}
changes_diagram: |
```mermaind
...
```
{%- endif %}
```
(replace '...' with the actual values)
{%- endif %}