mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 04:40:38 +08:00
Msg is mandatory field for the request
This commit is contained in:
@ -350,7 +350,7 @@ class GerritProvider(GitProvider):
|
||||
msg.append(f'* {description}\n{full_path}')
|
||||
|
||||
if msg:
|
||||
add_comment(self.parsed_url, self.refspec, "---\n".join(msg))
|
||||
add_comment(self.parsed_url, self.refspec, "\n".join(msg))
|
||||
return True
|
||||
|
||||
def publish_comment(self, pr_comment: str, is_temporary: bool = False):
|
||||
|
@ -30,7 +30,7 @@ class Action(str, Enum):
|
||||
class Item(BaseModel):
|
||||
refspec: str
|
||||
project: str
|
||||
msg: str = ""
|
||||
msg: str
|
||||
|
||||
|
||||
@router.post("/api/v1/gerrit/{action}")
|
||||
@ -46,7 +46,7 @@ async def handle_gerrit_request(action: Action, item: Item):
|
||||
)
|
||||
await PRAgent().handle_request(
|
||||
f"{item.project}:{item.refspec}",
|
||||
f"/{action.value} {item.msg.strip()}"
|
||||
f"/{item.msg.strip()}"
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user