botkube
botkube copied to clipboard
Don't close the upgrade watcher after the first notification
Is your feature request related to a problem? Please describe.
Currently, if you start the BotKube with older version, you get the notification about a newer release.
However, the “watcher loop” is closed after that notification, and you will not get a new notification if there will be yet another new release.
Describe the solution you'd like
We can think to:
- send the notification if there is a newer version, e.g. 0.13.0,
- and instead of quitting, save the version that we already have informed them about (e.g. 0.13.0),
- and if there is a new version, e.g. 0.13.3, repeat 1-2.
Additionally, we can add an optional “reminder” that will, e.g., one per w week/month notify about new release if available.
Moreover, in case of error, we can only log them and retry instead of quitting. For example,
if release.TagName == nil {
return false, errors.New("release tag is empty")
}
This doesn't look like a “permanent” error, more like sth that may be fixed, so retry can solve it.