Проверяем, как работает относительно длинное сообщение в коммите на кириллице

This commit is contained in:
aarizona 2024-05-02 12:42:55 +03:00
parent f07439de54
commit dfd883d7b3
1 changed files with 7 additions and 1 deletions

View File

@ -23,11 +23,17 @@ async def intgr(request: Request):
if number == "test":
number = 423
bx_comment = (
f"Сообщение от GITEA для задачи {number} (ветка {body['ref']} в репозитории {body['repository']['fullname']})"
"\n\n"
f"{body['commits'][0]['message']}"
)
bx_res = requests.get(
"https://crm.svs-tech.pro/rest/38/7ufrqnfpncmt279p/task.commentitem.add.json?"
f"taskId={number}"
f"&fields[POST_MESSAGE]={body['commits'][0]['message']}"
f"&fields[POST_MESSAGE]={bx_comment}"
)
logger.info(f"result {json.loads(bx_res.text)}")
return {"status": "success"}