Skip to content

Latest commit

 

History

History
57 lines (48 loc) · 1.11 KB

README.md

File metadata and controls

57 lines (48 loc) · 1.11 KB

@ubiquibot/user-activity-watcher

Watches user activity on issues, sends reminders on deadlines, and eventually unassigns inactive user to ensure that tasks don't stall, and subtracts XP.

Setup

yarn install

Then copy .dev.vars.example to .dev.vars and fill the required values.

Database

To start a local instance, run

supabase start

Afterward, you can generate types for full auto-completion with

yarn supabase:generate:local

Worker

Start the Worker by running

yarn dev

Make requests

To trigger the worker, POST requests should be made to http://localhost:4000 with a Content-Type: application/json header and a body looking like

{
  "stateId": "",
  "eventName": "",
  "eventPayload": "",
  "settings": "",
  "ref": ""
}

For convenience, you can find an .http file with a valid request here.

Test

To start Jest testing, run

yarn test

Valid configuration

- plugin: ubiquibot/user-activity-watcher
  type: github
  with:
    disqualification: "7 days"
    warning: "3.5 days"