-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
docs: #1082 Update docs from CofeeScript to JavaScript examples #1587
Conversation
An idea for maybe later... I wonder if we can run the code examples in this as part of CI? 🤔 |
I was thinking the same thing. Parse out the code and run it. Later would be great. |
@technicalpickles I added you to the reviewers list because I assume that's required to pass the "review required" requirement. |
docs/scripting.md
Outdated
``` | ||
|
||
The `robot` parameter is an instance of your robot friend. At this point, we can start scripting up some awesomeness. | ||
The `robot` argument is an instance of your robot friend. At this point, we can start scripting up some awesomeness. |
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 think technically Javascript refers to them as parameters, but they are effectively synonyms.
scripts/help.js
Outdated
@@ -0,0 +1,20 @@ | |||
// Description: |
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.
Did you intend to include this?
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.
Yes. scripting.md
references it:
The included
help.js
lets a user ask for help across all commands, or with a search.
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.
Ah, I think that is actually referring to the help script that would have been auto-generated. I'm not sure when it changed, but that's actually an external script now: https://github.com/hubotio/hubot-help
We do generate an example.js with a bunch of examples though: https://github.com/hubotio/generator-hubot/blob/master/generators/app/templates/scripts/example.js
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.
Are you saying I should remove it then?
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.
If it was loaded on a default instance of Hubot, I could see it being useful. But it doesn't, so it doesn't "work" on default. I'm going to remove it.
Thank you for reviewing this so thoroughly. I've replaced |
…the docs was really supposed to be to something else
* Two buckets of access: full and restricted with include/exclude list | ||
* Specific access rules for every command (Role-based Access Control) | ||
* Blacklisting/whitelisting commands in specific rooms | ||
* Include/exclude listing commands in specific rooms |
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.
Just wanted to call this out, thanks for making the change! It is a change I try to do whenever I notice it.
Addresses issue #1082 . Update the documentation to use JavaScript examples instead of CofeeScript.