Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pr_agent/settings/pr_description_prompts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Related Ticket Info:
{% for ticket in related_tickets %}
=====
Ticket Title: '{{ ticket.title }}'
{%- if ticket.labels %}
{%- if ticket.labels is defined and ticket.labels %}
Ticket Labels: {{ ticket.labels }}
{%- endif %}
{%- if ticket.body %}
Expand Down
2 changes: 1 addition & 1 deletion pr_agent/settings/pr_reviewer_prompts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Ticket URL: '{{ ticket.ticket_url }}'

Ticket Title: '{{ ticket.title }}'

{%- if ticket.labels %}
{%- if ticket.labels is defined and ticket.labels %}

Ticket Labels: {{ ticket.labels }}

Expand Down
12 changes: 11 additions & 1 deletion pr_agent/tools/ticket_pr_compliance_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,20 @@ async def extract_tickets(git_provider):
if len(sub_body) > MAX_TICKET_CHARACTERS:
sub_body = sub_body[:MAX_TICKET_CHARACTERS] + "..."

# Extract sub-issue labels
sub_labels = []
try:
for label in sub_issue.labels:
sub_labels.append(label.name if hasattr(label, 'name') else label)
except Exception as e:
get_logger().error(f"Error extracting labels error= {e}",
artifact={"traceback": traceback.format_exc()})

sub_issues_content.append({
'ticket_url': sub_issue_url,
'title': sub_issue.title,
'body': sub_body
'body': sub_body,
'labels': ", ".join(sub_labels)
})
except Exception as e:
get_logger().warning(f"Failed to fetch sub-issue content for {sub_issue_url}: {e}")
Expand Down
Loading