Skip to content

Commit

Permalink
core:update telex webhook url
Browse files Browse the repository at this point in the history
  • Loading branch information
malachsalama committed Feb 23, 2025
1 parent b74d34e commit ee6ccb3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/routes/integration_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"default": "high priority task"
}
],
"target_url": settings.TELEX_WEBHOOK_URL,
"target_url": settings.SLACK_WEBHOOK_URL,
"tick_url": settings.TICK_URL
}
}
Expand Down
4 changes: 2 additions & 2 deletions api/routes/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ async def jira_webhook(request: Request):
)

# Send notification to Telex
telex_webhook_url = settings.TELEX_WEBHOOK_URL
slack_webhook_url = settings.SLACK_WEBHOOK_URL
async with httpx.AsyncClient() as client:
response = await client.post(telex_webhook_url, json={"text": message})
response = await client.post(slack_webhook_url, json={"text": message})
response.raise_for_status()

logging.info("High-priority notification sent to Telex successfully!")
Expand Down
2 changes: 1 addition & 1 deletion core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Settings(BaseSettings):
TESTING: bool = False
EC2_PUBLIC_IP: str = os.getenv("EC2_PUBLIC_IP", "ec2-51-20-251-125.eu-north-1.compute.amazonaws.com")
TICK_URL: str = os.getenv("TICK_URL", f"https://{EC2_PUBLIC_IP}/jira-webhook")
TELEX_WEBHOOK_URL: str = os.getenv("TELEX_WEBHOOK_URL", "")
SLACK_WEBHOOK_URL: str = os.getenv("SLACK_WEBHOOK_URL", "")


settings = Settings()

0 comments on commit ee6ccb3

Please sign in to comment.