Msg is mandatory field for the request

This commit is contained in:
Nikolay Telepenin
2023-09-04 15:49:30 +01:00
parent 7584ec84ce
commit 53ce609266
2 changed files with 3 additions and 3 deletions

View File

@ -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()}"
)