-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Code Refactor #133
base: master
Are you sure you want to change the base?
Code Refactor #133
Conversation
This reverts commit 8aaa99c.
Incredible! Awesome work. I'll try to find the time to review this asap, and figure out a way to include it in the st2chatops package as well. |
@emedvedev I noticed on the original code there was support for sending a signal to reload the commands and then there's also a timer that reloads them by default every 120 seconds, does something in the st2 stack trigger the chatops service to reload commands and/or do we need support for reloading commands both ways? |
This reverts commit 6746649.
…g, also testing whether you can hide a command by not specifying display and just specifying representation
"description": "A hubot plugin for integrating with StackStorm event-driven infrastructure automation platform.", | ||
"version": "0.4.5", | ||
"author": "StackStorm, Inc. <info@stackstorm.com>", | ||
"name": "hubot-stackstorm-auth", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is going on in this file? :)
Did you intend to open this PR here or your fork?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have this automated to setup our stackstorm box and needed a different package name in npm. I can branch and change that back for the merge. Wasn't sure when this was going to get more attention.
@silverbp Both ways of (re) loading commands will need to be supported in this rewrite. I like this, but can you rebase on current |
I have refactored the chat provider adapters in #186 using part of this PR as a blueprint. Hopefully this makes it easier for the community to add chat provider adapters for other platforms. Hopefully we can refactor @silverbp Thank you for taking the time to write this PR, I have learned a great deal about Javascript coding practices from reading your code. Although we won't be using this PR directly when refactoring |
The Further WorkNow that
|
I'm leaving this PR open to track refactoring progress. I'll close it once the refactoring inspired by this PR is complete. |
Marking as stale only so Pull Reminder doesn't keep pinging me about this. |
|
This refactor includes (resolves #128 and #114):
messaging_handler
which is then pulled in once and also eachmessaging_handler
is separated out into its own file for better organization.if you set something like this in your env file:
then configure your action-aliases to look like the following, it will add role/room authentication to the action-alias. (hubot-auth-middleware-ext also support different environments as well)
roles and/or rooms are optional although it might be pointless if you don't have either of them and still define the hubot_auth part. (it won't do auth if you leave it all out)
https://github.com/HelloFax/hubot-auth-middleware (should note that the npm package has ext on the end of it, the directions are not accurate on the package name)
I renamed the npm package to hubot-stackstorm-auth for now so it's easier to use.
If you want to persist the roles, you'll need to install redis.
the external-scripts.json would then look like this:
obviously installing hubot-stackstorm from this repo instead of npm.
Remaining things to do: