Skip to content
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

Merged
merged 12 commits into from
Apr 20, 2023
Merged

docs: #1082 Update docs from CofeeScript to JavaScript examples #1587

merged 12 commits into from
Apr 20, 2023

Conversation

joeyguerra
Copy link
Member

Addresses issue #1082 . Update the documentation to use JavaScript examples instead of CofeeScript.

@joeyguerra joeyguerra changed the title docs: Update docs from CofeeScript to JavaScript examples docs: #1082 Update docs from CofeeScript to JavaScript examples Apr 17, 2023
@technicalpickles
Copy link
Member

An idea for maybe later... I wonder if we can run the code examples in this as part of CI? 🤔

@joeyguerra
Copy link
Member Author

I was thinking the same thing. Parse out the code and run it. Later would be great.

@joeyguerra
Copy link
Member Author

@technicalpickles I added you to the reviewers list because I assume that's required to pass the "review required" requirement.

docs/patterns.md Outdated Show resolved Hide resolved
docs/scripting.md Outdated Show resolved Hide resolved
```

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.
Copy link
Member

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.

docs/scripting.md Outdated Show resolved Hide resolved
docs/scripting.md Outdated Show resolved Hide resolved
scripts/help.js Outdated
@@ -0,0 +1,20 @@
// Description:
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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

Copy link
Member Author

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?

Copy link
Member Author

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.

@joeyguerra
Copy link
Member Author

Thank you for reviewing this so thoroughly. I've replaced response with res, argument(s) with parameter(s) because it makes sense to me as well. I left the help.js file because the documentation references it. But I don't have any other reason for including it.

…the docs was really supposed to be to something else
Comment on lines +170 to +172
* 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
Copy link
Member

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.

@joeyguerra joeyguerra merged commit 7716663 into hubotio:master Apr 20, 2023
@joeyguerra joeyguerra deleted the update-docs-to-js branch April 21, 2023 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants