Skip to content

Commit

Permalink
Correction key error url mattermost
Browse files Browse the repository at this point in the history
  • Loading branch information
LawiK974 committed Jun 12, 2024
1 parent 02cb065 commit c3af8c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions kube_notify/mattermost.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


def send_mattermost_message(
url: str,
webhook: str,
title: str,
description: str,
fields: dict,
Expand All @@ -25,6 +25,6 @@ def send_mattermost_message(
channel and data.update({"channel": channel})
username and data.update({"username": username})
icon_url and data.update({"icon_url": icon_url})
response = requests.post(url, headers=headers, data=json.dumps(data))
response = requests.post(webhook, headers=headers, data=json.dumps(data))
if response.status_code != 200:
logger.logger.error("Failed to send notification to Mattermost")
2 changes: 1 addition & 1 deletion kube_notify/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async def handle_notify(
if group_values := group.get("mattermost"):
notifs.append(f"{group_name}/mattermost")
mattermost.send_mattermost_message(
group_values["url"],
group_values["webhook"],
title,
description,
fields,
Expand Down

0 comments on commit c3af8c6

Please sign in to comment.