Skip to content

Contributions

Kevin edited this page Aug 3, 2023 · 1 revision

If you're interested in contributing to Workflow Buddy through code. New to developing Slack Workflow Steps? Check out the Workflow Builder Developer Guide | Building on Slack.

UI/UX Development

For the "UI" block surfaces (especially App Home), highly recommend opening in Block Kit Builder with the helper utility get_block_kit_builder_link().

# Open Python REPL
>>> import utils
>>> utils.get_block_kit_builder_link(view=utils.build_app_home_view())
# copy the resulting link into address bar, avoiding the '' Python surrounds it with.

How it works

For Slack events, this app basically just acts as a proxy. As long as the event is added to the bot's OAuth scopes, it should be able to proxy it through to your Workflow Builder flow.

For the new actions, it registers a Workflow Builder Step - unfortunately each app is limited to 10 registered with Slack. To get around that limitation, we have the user select from a static select list of actions that have been implemented on the server, then update the modal to give them the appropriate options. For example, if the user wants to Send a webhook, we'll then update the modal to have an input for the Webhook URL, and a text box for the body they want to send.

Data: Config data (basically just webhooks for now) is persisted on disk using a SQlite DB.

Tools

We use a number of tools in & around this repo to improve the code quality:

Notes on using Fly.io

Saving a few helpful things I've run into for those who are self-hosting.

Pull files (like SQLite DB) to local machine

There are plenty of reasons to pull files down - backups, easier querying, etc. Fly offers a number of different ways to get access to files, and I've had varying luck with each of them:

  • flyctl ssh sftp shell, then manually selecting a file with > get < filename >. Then Ctrl+C out of it.
  • flyctl sftp get /usr/app/data/workflow_buddy.db didn't work for me. What's odd is the same exact command with sftp find was able to locate the file, as well as manually selecting it with sftp shell. Confusing.

Open a console and explore

Easily done with flyctl ssh console.

Proxy localhost to server

❌ I've had no luck with flyctl proxy 4747 - supposedly proxy should let you interact with the server as if it was running on your local, but both curl and my browser end up hanging indefinitely when I reach to http://localhost:4747.

Clone this wiki locally