A slackbot for writing handover posts
Make sure you have pnpm installed globally. If not, run the following command:
npm install -g pnpm
- Create an .env file
cp .env.template .env
-
Get the required credentials from
1Password
forHandover Bot Test Env(ZilchWorld)
, and paste them into the.env
file. Replace the placeholder forSLACK_APP_TOKEN
,SLACK_BOT_TOKEN
,SLACK_SIGNING_SECRET
,HANDOVER_CHANNEL
, andHANDOVER_TITLE
-
In the
.env
file, changerunn_handover_test
torunn_handover
-
create a new database for the dev environment
pnpm prisma db push
-
There's a Slack workspace for testing called
Zilchworld
. Create a new account onzilchworld.slack.com
or request access on the #dev-handover channel -
Run the handover bot locally
pnpm run dev
- Now you'll be able to run and test the handover bot on ZilchWorld!
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
-
Update the
schema.prisma
file (for more details about Prisma Schema, please visit Prisma Docs) -
To create and run a new migration automatically for applying schema changes, run the following command:
pnpm prisma migrate dev --name=[name for migration]
For any questions or discussions, please flick a message on #dev-handover