MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / main

Function main

diffusers/utils/notify_community_pipelines_mirror.py:29–47  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

27
28
29def main(args):
30 action_url = f"https://github.com/{GITHUB_REPO}/actions/runs/{GITHUB_RUN_ID}"
31 if args.status == "success":
32 hub_path = f"https://huggingface.co/datasets/diffusers/community-pipelines-mirror/tree/main/{PATH_IN_REPO}"
33 message = (
34 "✅ Community pipelines successfully mirrored.\n"
35 f"🕸️ GitHub Action URL: {action_url}.\n"
36 f"🤗 Hub location: {hub_path}."
37 )
38 else:
39 message = f"❌ Something wrong happened. Check out the GitHub Action to know more: {action_url}."
40
41 payload = {"text": message}
42 response = requests.post(SLACK_WEBHOOK_URL, json=payload)
43
44 if response.status_code == 200:
45 print("Notification sent to Slack successfully.")
46 else:
47 print("Failed to send notification to Slack.")
48
49
50if __name__ == "__main__":

Calls

no outgoing calls

Tested by

no test coverage detected