-
-
Notifications
You must be signed in to change notification settings - Fork 751
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
Add chat context to chatops #4609
Conversation
I like the idea of more generic context parameter. Only thing I don't like about such "generic" dictionary parameters is usually lack of schema / structure. We had a "problem" with that in Mistral workflows where it wasn't always clear which attributes are available to the user in that context dictionary. So at the very least we should document possible attributes in this dictionary where it's applicable. |
It's not really possible to define much of a schema - the actual dictionary schema will be specific to each hubot adapter. But it should only be passed back to the |
I just saw this pull request. Will these contexts specific to hubot adapters be documented or would other project maintainers using the chatops pack need to reverse engineer hubot to maintain compatibility? |
@nzlosh Right now, the only provider that uses the ChatOps is one place where we can use better documentation, including developer documentation. While we can document the entire context received from each supported chat provider, some providers may change their sent context over time. Slack, especially, changes their API a lot. So while we will try to document the context sent by each supported provider, it will be a "best effort" approach, and certainly may be out of date as time goes on/across version changes. This is, of course, an area where we would appreciate pull requests from the community. |
Thanks @blag, I appreciate the explanation and understand external API stability guarantees are not easy to handle. My concern with the addition of the free form The
The new field I raise this point with maintaining coherency and compatibility in mind for projects that use the action-alias API and chatops pack. I know there aren't many projects impacted by this concern and I understand that there is no requirement for StackStorm to provide such a contract. |
The problem with The end result is that there are now two paths for providers to provide data - the At this point it is premature to bikeshed about what this will look like, as I have a lot more work to do before approaching this change again. |
This is part of the work to add a Microsoft Teams (via BotFramework) adapter.
Microsoft Teams needs a bit more context other than the requesting user and the channel name.
Instead of adding the minimum amount of context, this PR adds a
context
parameter to thepost_
actions in the chatops pack and adds it to the notifyon_complete
dictionary. Thecontext
parameter maximizes the amount of information available to the notification mechanism, in the hopes that it can be reused by other adapters.