-
Notifications
You must be signed in to change notification settings - Fork 115
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
feat: notify admin to update solvers in the community #618
base: main
Are you sure you want to change the base?
Conversation
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.
Hello, did you tested it locally? It's not working properly:
- This message is not being displayed:
Your community ${community.name} doesn't have any solvers. Please add at least one solver to avoid being disabled.
- Even though the logs say:
Community: ${community.name} has been disabled due to lack of solvers.
the community is not being disabled. You can continue using it normally. - I recommend putting the warning messages to the administrators in the language they have the bot set in, in the yaml of ./locales. You can see as an example at Add cronjob to notify admin about missing solvers (#314) #563
Thank you for the review. I'll work on these feedbacks. |
…sages are localized
Hi @Catrya, I've addressed all the feedbacks here. Please have a look and let me know if there're other changes.
|
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.
Hi @Anyitechs , much better, it already sends messages to the admins and disables the community. However, I think the message for the admins could be improved so that they know how much time they have to put a new admin.
I think it could be something like this:
Your community ${communityName} does not have any solvers. Please add at least one within X days to prevent the community from being disabled.
Actually the number of notifications that the solver receives before disabling the community is MAX_MESSAGES -1 because it disables it in MAX_MESSAGES, I suggest that it shows that number of notifications before disabling it
I will continue testing and I will tell you if I find any bug, good job!
This PR schedules a daily job at midnight to notify the admin of a community that there are no solvers in the community. The maximum number of notification messages right now is set to 5, afterwards the community is disabled.
Fixes #314