geeksforsocialchange / imok

A simple bot to support people doing risky activities
https://gfsc.studio/blog/2021/imok-is-launched/
MIT License
12 stars 1 forks source link

feat: notify admins on new releases #82

Closed wheresalice closed 3 years ago

wheresalice commented 3 years ago

Notify admins that a new deployment was made to their server. If the commit is in this GitHub repo then it will also include the latest git commit.

Example messages:

A new version of imok was deployed.
This commit was not found upstream
A new version of imok was deployed.
Commit: 18ede24c08f57e37ebb72fd1389232419fec56b9
Committer: WheresAlice
Message: feat: notify admins on new releases

I'm open to better messaging.

The only thing we know about the release is the git commit, and that git commit may or may not be in this repository.

kimadactyl commented 3 years ago

Looks great, well done on getting this up!

I take it there is no meaningful way of testing this? I quite like the gherkins being a description of every feature the software has but understand this is prob a nightmare to write anything for.

I think the messages look fine. Questions about possible improvements:

wheresalice commented 3 years ago

I've added a link to the latest commit, though this might not mean much to the admins

I've also added tests to make sure the message being sent is sensible, but not that it actually gets sent at deploy time

In theory releases should be mentioned too, and the tests support that. But we'd need to do another release to fully prove that.

Markdown in messages is a good idea, but seems to be a little broken in the bot API. It causes messages to fail to be sent if they contain brackets.