-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Utility] feat: add utilities to notify slack about a new library release. #6973
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
This is wrongly crafted. In its current form, the bot will always notify the channel within a fixed interval. We need to make it conditional on the PyPI release status instead. Will look into it. |
cc @ydshieh who might have tips/comments about the Slack-related work (he's handling it from the transformers' POV) |
@ydshieh a gentle ping in case you want to exchange notes :) |
response = requests.get(url) | ||
if response.status_code == 200: | ||
data = response.json() | ||
return {"tag_name": data["tag_name"], "url": data["html_url"]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return {"tag_name": data["tag_name"], "url": data["html_url"]} | |
return {"tag_name": data["tag_name"], "url": data["html_url"], "release_time" : data["published_at"} |
we can maybe:
- extract the published time the latest release here
- compare with the current time and notify if it is less than 12 hours?
Hi @sayakpaul I love the idea of having such notification! In As you know and mentioned by @yiyixuxu , the condition has to be adjusted. Also, at the end, we need to decide which libraries to watch for the notifications. I would rather fail the script if the information could not be fetched instead of just printing a message. |
Closing this with #7270. |
What does this PR do?
This is how such an automatic notification would look like (internal link): https://huggingface.slack.com/archives/C03HBN1C8CW/p1707889851090899.
Steps to create the webhook-enabled Slack Bot (documenting in case someone else finds it useful):