Skip to content

falcowinkler/kudo-box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kudo-box

A virtual kudo box.

  • Team members can upload kudo card texts with a simple command
  • Moderators can publish the cards in a slack channel, e.g. during agile rituals

The functionality is powered by two independent serverless functions.

write-kudo

This serverless function can respond to a slack command and stores a kudo text in the kudo box.

setup

Set up a virtual env and install the dependencies:

pip install -r requirements.txt
pip install -r dev-requirements.txt

development

First we need some env vars;

export SLACK_SIGNING_SECRET=<Signing secret from basic information tab in api.slack.com/apps>
export SLACK_BOT_TOKEN=<Bot user oauth token from Oauth2 tab in api.slack.com/apps>

We can start a local database/pubsub as follows.

gcloud beta emulators datastore start &
gcloud beta emulators pubsub start &

Now you can run the serverless function locally with a test database.

export DATASTORE_EMULATOR_HOST=localhost:8081
export PUBSUB_EMULATOR_HOST=localhost:8432
functions-framework-python --target write_kudo --debug

If you want to debug locally with an actual slack request, use ngrok:

ngrok http 8080

The --debug flag allows you to attach a debugger as well, or you can create a pycharm run configuration that executes above command, and launch it with debugger.

tests

pytest

deployment

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published