MCPcopy
hub / github.com/huggingface/diffusers / notify_slack

Function notify_slack

utils/notify_slack_about_release.py:52–65  ·  view source on GitHub ↗

Send a notification to a Slack channel.

(webhook_url, library_name, version, release_info)

Source from the content-addressed store, hash-verified

50
51
52def notify_slack(webhook_url, library_name, version, release_info):
53 """Send a notification to a Slack channel."""
54 message = (
55 f"🚀 New release for {library_name} available: version **{version}** 🎉\n"
56 f"📜 Release Notes: {release_info['url']}\n"
57 f"⏱️ Release time: {release_info['release_time']}"
58 )
59 payload = {"text": message}
60 response = requests.post(webhook_url, json=payload)
61
62 if response.status_code == 200:
63 print("Notification sent to Slack successfully.")
64 else:
65 print("Failed to send notification to Slack.")
66
67
68def main():

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…