Skip to content

ubq-testing/assistive-pricing

 
 

Repository files navigation

@ubiquity-os/daemon-pricing

Helps settings prices and adds label to the issues accordingly.

Usage

Example of valid configuration:

- plugin: https://ubiquity-os-daemon-pricing.ubq.fi
  with:
    labels:
      time:
        - name: "Time: <1 Hour"
          collaboratorOnly: false
        - name: "Time: <2 Hours"
          collaboratorOnly: false
        - name: "Time: <4 Hours"
          collaboratorOnly: false
        - name: "Time: <1 Day"
          collaboratorOnly: false
        - name: "Time: <1 Week"
          collaboratorOnly: false
      priority:
        - name: "Priority: 1 (Normal)"
          collaboratorOnly: false
        - name: "Priority: 2 (Medium)"
          collaboratorOnly: true
        - name: "Priority: 3 (High)"
          collaboratorOnly: false
        - name: "Priority: 4 (Urgent)"
          collaboratorOnly: false
        - name: "Priority: 5 (Emergency)"
          collaboratorOnly: false
    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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 95.2%
  • JavaScript 3.3%
  • CSS 1.1%
  • Other 0.4%