feat: add ticket compliance check

- Implement ticket compliance check logic in `utils.py` and `ticket_pr_compliance_check.py`
- Add functions to extract and cache PR tickets, and check ticket relevancy
This commit is contained in:
mrT23
2024-10-10 08:48:37 +03:00
parent 014ea884d2
commit 76d95bb6d7
12 changed files with 365 additions and 86 deletions

View File

@ -78,9 +78,9 @@ pr_files:
...
...
{%- endif %}
description: |-
description: |
...
title: |-
title: |
...
{%- if enable_custom_labels %}
labels:
@ -94,7 +94,26 @@ labels:
Answer should be a valid YAML, and nothing else. Each YAML output MUST be after a newline, with proper indent, and block scalar indicator ('|')
"""
user="""PR Info:
user="""
{%- if related_tickets %}
Related Ticket Info:
{% for ticket in related_tickets %}
=====
Ticket Title: '{{ ticket.title }}'
{%- if ticket.labels %}
Ticket Labels: {{ ticket.labels }}
{%- endif %}
{%- if ticket.body %}
Ticket Description:
#####
{{ ticket.body }}
#####
{%- endif %}
=====
{% endfor %}
{%- endif %}
PR Info:
Previous title: '{{title}}'