Skip to content

Commit

Permalink
formattting
Browse files Browse the repository at this point in the history
  • Loading branch information
kerrychu committed Jan 23, 2024
1 parent 1252e17 commit 5132757
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions hooks/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@


def send_slack_message(data: dict[str, str], webhook: str) -> str:
"""
send slack message with given data
Args:
data: job records
text= ""
for key, value in data.items():
text += f"- {key}: {value}\n"

Returns: request response
"""
payload = {"text": json.dumps(data)}
payload_json = json.dumps(payload)
headers = {"Content-type": "application/json"}
Expand Down

0 comments on commit 5132757

Please sign in to comment.