add request webhook
This commit is contained in:
parent
607cf9ae64
commit
437a7ec122
10
app/main.py
10
app/main.py
|
@ -16,5 +16,13 @@ async def intgr(request: Request):
|
||||||
ref = body["ref"]
|
ref = body["ref"]
|
||||||
branch = ref.split('/')[-1]
|
branch = ref.split('/')[-1]
|
||||||
[tag, number, *args] = branch.split('-')
|
[tag, number, *args] = branch.split('-')
|
||||||
logger.info(f"{tag} {number} {args}")
|
logger.info(f"tag {tag} number {number} args {args}")
|
||||||
|
|
||||||
|
if number == 'test':
|
||||||
|
number = 423
|
||||||
|
|
||||||
|
request.get(
|
||||||
|
"https://crm.svs-tech.pro/rest/38/7ufrqnfpncmt279p/task.commentitem.add.json?"
|
||||||
|
f"taskId={number}&fields[POST_MESSAGE]=f'{body['commits'][0]['message']}'"
|
||||||
|
)
|
||||||
return {"status": "success"}
|
return {"status": "success"}
|
||||||
|
|
Loading…
Reference in New Issue