Skip to content

Runn-Fast/handover

Repository files navigation

Handover

A slackbot for writing handover posts

screenshot of slack

Prerequisite

Make sure you have pnpm installed globally. If not, run the following command:

npm install -g pnpm

Running

  1. Create an .env file
cp .env.template .env
  1. Get the required credentials from 1Password for Handover Bot Test Env(ZilchWorld), and paste them into the .env file. Replace the placeholder for SLACK_APP_TOKEN, SLACK_BOT_TOKEN, SLACK_SIGNING_SECRET, HANDOVER_CHANNEL, and HANDOVER_TITLE

  2. In the .env file, change runn_handover_test to runn_handover

  3. create a new database for the dev environment

pnpm prisma db push
  1. There's a Slack workspace for testing called Zilchworld. Create a new account on zilchworld.slack.com or request access on the #dev-handover channel

  2. Run the handover bot locally

pnpm run dev
  1. Now you'll be able to run and test the handover bot on ZilchWorld!

Run Tests

cp .env.template .env.test

# update DATABASE_URL to point to Postgres
edit .env.test

# install dependencies (if you haven't already)
pnpm install

# run database migrations
pnpm prisma:test db push

# run tests!
pnpm run test

DB migration

  1. Update the schema.prisma file (for more details about Prisma Schema, please visit Prisma Docs)

  2. To create and run a new migration automatically for applying schema changes, run the following command:

pnpm prisma migrate dev --name=[name for migration]

Troubleshooting

For any questions or discussions, please flick a message on #dev-handover

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published