botkube
botkube copied to clipboard
Refactor Bots in `bot` package
Overview
Currently, Bot package contains merged Bot and Notifier functionality as a part of https://github.com/kubeshop/botkube/issues/596 (specifically #658 - PR: #662). Both notifier and bot code is quite hard to maintain, and contains unnecessary complexity.
Acceptance Criteria
- For each bot in the
bot
package:- split it to multiple files in a separate package,
-
handle
andsend
methods fromdiscord/slack/mattermostMessage
should be defined on Bot level, - review all the methods and see if they can be simplified.
- maybe there also some unnecessary fields? For example, as discovered in #666, there were 4 unused fields. There might be even more
- Additionally, For MS Teams:
- see if we cannot set conversation ref without waiting for
@BotKube notify start
message. - see if a public endpoint can be avoided to handle Teams messages.
- see if we cannot set conversation ref without waiting for
Reason
The current codebase could be improved to improve maintability - increase pace of shipping new features etc.