fix: handle empty body in GitHub issue resolver (#13039)

Co-authored-by: User <user@example.com>
This commit is contained in:
不做了睡大觉
2026-03-19 00:36:52 +08:00
committed by GitHub
parent eb9a822d4c
commit c62b47dcb1

View File

@@ -8,7 +8,7 @@
from abc import ABC, abstractmethod
from typing import Any
from pydantic import BaseModel
from pydantic import BaseModel, field_validator
class ReviewThread(BaseModel):
@@ -21,7 +21,13 @@ class Issue(BaseModel):
repo: str
number: int
title: str
body: str
body: str = ''
@field_validator('body', mode='before')
@classmethod
def body_must_not_be_none(cls, v: str | None) -> str:
return v if v is not None else ''
thread_comments: list[str] | None = None # Added field for issue thread comments
closing_issues: list[str] | None = None
review_comments: list[str] | None = None