From dfd883d7b3b6fc2c5467a391e79b8797ee9bbded Mon Sep 17 00:00:00 2001 From: aarizona Date: Thu, 2 May 2024 12:42:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D1=8F?= =?UTF-8?q?=D0=B5=D0=BC,=20=D0=BA=D0=B0=D0=BA=20=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=B0=D0=B5=D1=82=20=D0=BE=D1=82=D0=BD=D0=BE=D1=81=D0=B8?= =?UTF-8?q?=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D0=BE=20=D0=B4=D0=BB=D0=B8=D0=BD?= =?UTF-8?q?=D0=BD=D0=BE=D0=B5=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B2=20=D0=BA=D0=BE=D0=BC=D0=BC=D0=B8=D1=82?= =?UTF-8?q?=D0=B5=20=D0=BD=D0=B0=20=D0=BA=D0=B8=D1=80=D0=B8=D0=BB=D0=BB?= =?UTF-8?q?=D0=B8=D1=86=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index fc535b8..5de5c77 100644 --- a/app/main.py +++ b/app/main.py @@ -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"}