Meniole / daemon-pricing

0 stars 0 forks source link

@ubiquibot/assistive-pricing

Helps settings prices and adds label to the issues accordingly.

Usage

Example of valid configuration:

- plugin: https://ubiquibot-assistive-pricing.ubq.fi
  with:
    labels:
      time:
        - "Time: <1 Hour"
        - "Time: <2 Hours"
        - "Time: <4 Hours"
        - "Time: <1 Day"
        - "Time: <1 Week"
      priority:
        - "Priority: 1 (Normal)"
        - "Priority: 2 (Medium)"
        - "Priority: 3 (High)"
        - "Priority: 4 (Urgent)"
        - "Priority: 5 (Emergency)"
    basePriceMultiplier: 1
    publicAccessControl:
      setLabel: true
      fundExternalClosedIssue: false
    globalConfigUpdate:
      excludeRepos: ["devpool-directory", "devpool-directory-private"]

Running locally

Supabase

Supabase can be started through the CLI running

supabase start

Worker

Start the Worker by running

yarn worker

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.

Testing

Jest

To start Jest tests, run

yarn test