remove test
This commit is contained in:
parent
3608c3ec65
commit
e1e647f1b9
|
@ -0,0 +1 @@
|
|||
WEBHOOK='https://crm.svs-tech.pro/rest/38/7ufrqnfpncmt279p'
|
|
@ -1,5 +1,5 @@
|
|||
import os
|
||||
import logging
|
||||
import uuid
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
@ -9,3 +9,5 @@ logging.basicConfig(
|
|||
)
|
||||
logging.getLogger("httpx").setLevel(logging.WARNING)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
WEBHOOK = os.getenv('WEBHOOK')
|
|
@ -2,7 +2,7 @@ import requests
|
|||
import json
|
||||
from fastapi import FastAPI, Request
|
||||
|
||||
from app.constants import logger
|
||||
from app.constants import logger, WEBHOOK
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
@ -20,9 +20,6 @@ async def intgr(request: Request):
|
|||
|
||||
[tag, number, *args] = branch.split("-")
|
||||
logger.info(f"input tag {tag} number {number} args {args}")
|
||||
|
||||
if number == "test":
|
||||
number = 423
|
||||
|
||||
bx_comment = (
|
||||
f"Сообщение от GITEA для задачи {number} (ветка {body['ref']} в репозитории {body['repository']['full_name']})"
|
||||
|
@ -31,7 +28,7 @@ async def intgr(request: Request):
|
|||
)
|
||||
|
||||
bx_res = requests.get(
|
||||
"https://crm.svs-tech.pro/rest/38/7ufrqnfpncmt279p/task.commentitem.add.json?"
|
||||
f"{WEBHOOK}/task.commentitem.add.json?"
|
||||
f"taskId={number}"
|
||||
f"&fields[POST_MESSAGE]={bx_comment}"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue