-
Notifications
You must be signed in to change notification settings - Fork 420
docs: add "random fact generator" custom step workshop to tutorials #2694
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2694 +/- ##
=======================================
Coverage 93.44% 93.44%
=======================================
Files 37 37
Lines 7674 7674
Branches 669 669
=======================================
Hits 7171 7171
Misses 498 498
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
technically-tracy
left a comment
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.
👏
zimeg
left a comment
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.
@haleychaas I'm a fan of these writings! Thanks for bringing this to the bolt docs 🤖 ✨
I'm requesting a few changes with changing best practices that we can encourage in app setups I hope. I also made note of blank templates and perhaps sample implementation to reference later. Most comments aren't blocking though I believe! 📚
docs/english/tutorials/random-fact-generator/random-fact-generator.md
Outdated
Show resolved
Hide resolved
docs/english/tutorials/random-fact-generator/random-fact-generator.md
Outdated
Show resolved
Hide resolved
docs/english/tutorials/random-fact-generator/random-fact-generator.md
Outdated
Show resolved
Hide resolved
docs/english/tutorials/random-fact-generator/random-fact-generator.md
Outdated
Show resolved
Hide resolved
| Initialize a new Node.js project using the following command; answer each question with defaults. | ||
|
|
||
| ```sh | ||
| npm init |
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.
📎 thought: In a follow up I'm wondering if we can start from the blank template to remove configuration to the package.json file?
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.
Good callout. I'll create a follow-up task to rework this using the blank template!
docs/english/tutorials/random-fact-generator/random-fact-generator.md
Outdated
Show resolved
Hide resolved
docs/english/tutorials/random-fact-generator/random-fact-generator.md
Outdated
Show resolved
Hide resolved
docs/english/tutorials/random-fact-generator/random-fact-generator.md
Outdated
Show resolved
Hide resolved
| main(); | ||
| ``` | ||
|
|
||
| The code in the `app.js` file initializes the Bolt app using your tokens and signing secret and enables Socket Mode. Next, it defines the `getUselessFact()` function that retrieves a random fact using Axios. It uses the Bolt framework to create a Slack function named `useless_fact_step`. This is the same function we registered in the app manifest previously; the function's name, inputs, and outputs in the code must match with the what is defined in the app manifest. Finally, a function named `main()` is used to start the Bolt app. |
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.
| The code in the `app.js` file initializes the Bolt app using your tokens and signing secret and enables Socket Mode. Next, it defines the `getUselessFact()` function that retrieves a random fact using Axios. It uses the Bolt framework to create a Slack function named `useless_fact_step`. This is the same function we registered in the app manifest previously; the function's name, inputs, and outputs in the code must match with the what is defined in the app manifest. Finally, a function named `main()` is used to start the Bolt app. | |
| The code in the `app.js` file initializes the Bolt app using your tokens and signing secret and enables Socket Mode. Next, it defines the `getUselessFact()` function that fetches a random fact. It uses the Bolt framework to create a Slack function named `useless_fact_step`. This is the same function we registered in the app manifest previously; the function's name, inputs, and outputs in the code must match with the what is defined in the app manifest. Finally, a function named `main()` is used to start the Bolt app. |
👁️🗨️ suggestion: We're making "fetch" happen
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.
@zimeg I'm dead lol
docs/english/tutorials/random-fact-generator/random-fact-generator.md
Outdated
Show resolved
Hide resolved
zimeg
left a comment
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.
@haleychaas Thanks for the kind followup! LGTM! 📚 ✨
Summary
Moving this workshop to the tutorials of Bolt JS.
See a preview here.
Requirements (place an
xin each[ ])