Watson icon indicating copy to clipboard operation
Watson copied to clipboard

Add a hook for Slack/Teams status when starting/stopping project

Open kopytjuk opened this issue 3 years ago • 3 comments

Imagine you stop your project with

watson stop

And your status indication in Slack/Teams changes to "afk" or something similar.

A way to bind a hook to the currently active frame for a shell script or something would be helpful for such integrations...

Feel free to close if it is redundant, not in scope of Watson

kopytjuk avatar Nov 14 '22 10:11 kopytjuk

It would be fun to add as a plugin!

jmaupetit avatar Nov 14 '22 14:11 jmaupetit

I will leave some helpful information on Slack (for me or s.o. else who wants to work on that) ...

Slack allows writing user's status, see here. The required token can be retrieved in the way described here.

We have two options:

  1. watson sends HTTP requests to slack when the user starts or stops work. This way requires the user set it's credentials & token once in watson's config (or some ENV var).
  2. Periodically checking .config/watson/state and updating Slack/Teams status accordingly - not sure if this is in scope of this repository.

kopytjuk avatar Nov 15 '22 20:11 kopytjuk

A generic way to call any script as a hook for watson start/stop would be great as a start, because there's a gazillion use cases for such hooks (Slack/Teams included).

hinricht avatar Dec 07 '22 14:12 hinricht