Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: global label change via config #18

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
9d7534c
feat: commit change functions
Keyrxng Jul 24, 2024
a9d5af2
feat: global label update from config
Keyrxng Jul 24, 2024
c9eb181
chore: types and remove fatal logs
Keyrxng Jul 24, 2024
074a7ee
chore: fix test
Keyrxng Jul 24, 2024
896299f
chore: eslint, cspell, prettier
Keyrxng Jul 24, 2024
d1a36d9
chore: tests
Keyrxng Jul 25, 2024
f617526
chore: include logs in tests
Keyrxng Jul 25, 2024
a735015
feat: configurable global update
Keyrxng Jul 25, 2024
dafb45e
chore: eslint and typos
Keyrxng Jul 25, 2024
f8c3911
chore: update readme config example
Keyrxng Jul 25, 2024
11293f7
chore: fix eslint formatting
Keyrxng Jul 25, 2024
6bfffcb
chore: update tests
Keyrxng Jul 25, 2024
1a6dba5
chore: touch up
Keyrxng Jul 25, 2024
c0f44e1
chore: try catch octokit
Keyrxng Jul 25, 2024
2db62f7
chore: config item enable renamed to disable
Keyrxng Jul 25, 2024
f480d6e
chore: remove enable and make globalConfigUpdate optional
Keyrxng Jul 26, 2024
d259e29
chore: fix tests
Keyrxng Jul 26, 2024
b640369
fix: remove type casting
Keyrxng Jul 26, 2024
008d941
chore: single STRINGS location
Keyrxng Jul 26, 2024
49357f7
chore: relocate issue_comment
Keyrxng Jul 26, 2024
3aed1e5
chore: remove ubq references
Keyrxng Jul 29, 2024
945bd12
feat: ubiquibot-logger
Keyrxng Jul 29, 2024
71c9219
chore: throw error logs and fix naming
Keyrxng Aug 6, 2024
cc969bb
chore: use if and throw
Keyrxng Aug 6, 2024
74eeef7
Merge branch 'development' into update
Keyrxng Sep 26, 2024
da5ead9
chore: list orgRepos and list repoIssues
Keyrxng Sep 26, 2024
5a3ac11
chore: update logger
Keyrxng Sep 26, 2024
590612d
chore: remove incorrect price/color labels, correct sync
Keyrxng Sep 28, 2024
9f3d388
chore: paginate listRepoLabels, formatting
Keyrxng Sep 28, 2024
20ec24c
chore: update tests
Keyrxng Sep 28, 2024
e92b3de
chore: comment out generating db types
Keyrxng Sep 28, 2024
c29c8b0
chore: extract vars from process.env
Keyrxng Sep 29, 2024
534d69a
chore: T.Optional public key as its disabled
Keyrxng Sep 29, 2024
73021cf
chore: add 1s wait in listLabelsForRepo
Keyrxng Sep 29, 2024
971c080
chore: bump wait to 5s to avoid secondary rate limit
Keyrxng Sep 29, 2024
f5ce4b0
chore: uncomment db type creation
Keyrxng Sep 29, 2024
954ead1
chore: add timeout to tests
Keyrxng Sep 29, 2024
1321012
chore: reposition incorrect label deletion
Keyrxng Sep 29, 2024
550d3fd
chore: cleanup and remove ubiquibot ref
Keyrxng Oct 20, 2024
e326fa0
feat: add @ubiquity-os/ubiquity-os-kernel
Keyrxng Oct 20, 2024
be999ee
chore: remove all UBIQUIBOT_PUBLIC_KEY refs
Keyrxng Oct 20, 2024
78181fe
chore: ubiquibot > ubiquity-os, assistive > daemon-pricing, fix tests
Keyrxng Oct 20, 2024
ab92961
Merge remote-tracking branch 'upstream/development' into development
Keyrxng Oct 20, 2024
78dfe41
chore: update logger pkg, sonar fix
Keyrxng Oct 20, 2024
69edb6f
chore: fix tests, remove log checks
Keyrxng Oct 20, 2024
37338c5
chore: install kernel required deps, update wrangler compat for interop
Keyrxng Oct 20, 2024
225dfc0
chore: update manifest req.url path
Keyrxng Oct 20, 2024
a37c0fd
chore: remove helpers/validator
Keyrxng Oct 20, 2024
a5b81a4
chore: returnDataToKernel
Keyrxng Oct 20, 2024
e2b56e2
chore: knip ignore kernel required deps
Keyrxng Oct 20, 2024
4244ce2
chore: temp disable db type creation
Keyrxng Oct 20, 2024
478bbfa
chore: add octokit/webhooks-methods
Keyrxng Oct 20, 2024
c4d545b
chore: bump kernel
Keyrxng Oct 21, 2024
6a32195
chore(workflow): update environment variables in GitHub Action
gentlementlegen Oct 23, 2024
d9e41c1
chore(workflow): update environment variables in GitHub Action
gentlementlegen Oct 23, 2024
1cf1b62
chore(workflow): update environment variables in GitHub Action
gentlementlegen Oct 23, 2024
916d6e4
chore(workflow): update environment variables in GitHub Action
gentlementlegen Oct 23, 2024
f0fae5f
chore: updated manifest.json and dist build
ubiquity-os-development[bot] Oct 23, 2024
b266c0a
Merge pull request #2 from Meniole/fork/ubq-testing/development
Keyrxng Oct 23, 2024
d86df53
Merge remote-tracking branch 'upstream/development' into development
Keyrxng Oct 23, 2024
4e142f5
chore: format, ignore dist from formatting
Keyrxng Oct 23, 2024
4064b28
chore: updated manifest.json and dist build
ubqbot[bot] Oct 23, 2024
a96e090
chore: knip
Keyrxng Oct 23, 2024
6d57b4e
Merge branch 'development' of https://github.com/ubq-testing/assistiv…
Keyrxng Oct 23, 2024
6cf1073
chore: updated manifest.json and dist build
ubqbot[bot] Oct 23, 2024
f330481
chore: remove wf comment
Keyrxng Oct 24, 2024
6073bc4
Merge remote-tracking branch 'upstream/development' into development
Keyrxng Oct 28, 2024
b39419b
chore: updated manifest.json and dist build
ubqbot[bot] Oct 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"ignorePaths": ["**/*.json", "**/*.css", "node_modules", "**/*.log", "**/*.toml", "**/*.http", "src/adapters/supabase/types/database.ts"],
"ignorePaths": [
"**/*.json",
"**/*.css",
"node_modules",
"**/*.log",
"**/*.toml",
"**/*.http",
"src/adapters/supabase/types/database.ts",
"bun.lockb",
"dist"
],
"useGitignore": true,
"language": "en",
"words": ["dataurl", "devpool", "outdir", "servedir", "supabase", "typebox", "typeguards", "mswjs", "ubiquity-os"],
"words": [
"gentlementlegen",
"AUTHED",
"UNAUTHED",
"Authed",
"Tand",
"dataurl",
"devpool",
"outdir",
"servedir",
"supabase",
"typebox",
"typeguards",
"mswjs",
"ubiquity-os"
],
"dictionaries": ["typescript", "node", "software-terms"],
"import": ["@cspell/dict-typescript/cspell-ext.json", "@cspell/dict-node/cspell-ext.json", "@cspell/dict-software-terms"],
"ignoreRegExpList": ["[0-9a-fA-F]{6}"]
Expand Down
3 changes: 1 addition & 2 deletions .dev.vars.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
SUPABASE_URL=
SUPABASE_KEY=
UBIQUIBOT_PUBLIC_KEY=
SUPABASE_KEY=
3 changes: 1 addition & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
SUPABASE_URL=
SUPABASE_KEY=
UBIQUIBOT_PUBLIC_KEY=
SUPABASE_KEY=
2 changes: 1 addition & 1 deletion .github/knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const config: KnipConfig = {
project: ["src/**/*.ts"],
ignore: ["src/types/config.ts", "src/adapters/supabase/types/database.ts"],
ignoreExportsUsedInFile: true,
ignoreDependencies: ["ts-node", "@types/jest"],
ignoreDependencies: ["ts-node", "@types/jest", "@octokit/plugin-retry", "@octokit/plugin-throttling", "hono"],
};

export default config;
11 changes: 4 additions & 7 deletions .github/workflows/compute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ on:
required: true
ref:
required: true
signature:
required: true

jobs:
run:
Expand All @@ -36,13 +38,8 @@ jobs:

- uses: oven-sh/setup-bun@v1

- name: Generate Supabase Types
run: |
yarn install
yarn run "supabase:generate:remote"
env:
SUPABASE_PROJECT_ID: ${{ secrets.SUPABASE_PROJECT_ID }}
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
- name: Install dependencies
run: yarn install

- name: Calling action
uses: ./
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jest-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/setup-node@v4
with:
node-version: '20.10.0'
node-version: "20.10.0"

- uses: actions/checkout@master
with:
Expand Down
51 changes: 5 additions & 46 deletions .github/workflows/update-configuration.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,17 @@
name: "Update Configuration"
name: "Update Configuration and Build"

on:
workflow_dispatch:
push:

jobs:
update:
name: "Update Configuration in manifest.json"
name: "Update Configuration & Build"
runs-on: ubuntu-latest
permissions: write-all

steps:
- uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: "20.10.0"

- name: Install deps and run configuration update
run: |
yarn install --immutable --immutable-cache --check-cache
yarn tsc --noCheck --project tsconfig.json

- name: Update manifest configuration using GitHub Script
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const path = require('path');

const { pluginSettingsSchema } = require('./src/types/plugin-input');

const manifestPath = path.resolve("${{ github.workspace }}", './manifest.json');
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));

const configuration = JSON.stringify(pluginSettingsSchema);

manifest["configuration"] = JSON.parse(configuration);

const updatedManifest = JSON.stringify(manifest, null, 2)
console.log('Updated manifest:', updatedManifest);
fs.writeFileSync(manifestPath, updatedManifest);

- name: Commit and Push generated types
run: |
git config --global user.name 'ubiquity-os[bot]'
git config --global user.email 'ubiquity-os[bot]@users.noreply.github.com'
git add ./manifest.json
if [ -n "$(git diff-index --cached --name-only HEAD)" ]; then
git commit -m "chore: updated generated configuration" || echo "Lint-staged check failed"
git push origin HEAD:${{ github.ref_name }}
else
echo "No changes to commit"
fi
- uses: ubiquity-os/action-deploy-plugin@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
2 changes: 0 additions & 2 deletions .github/workflows/worker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ jobs:
secrets: |
SUPABASE_URL
SUPABASE_KEY
UBIQUIBOT_PUBLIC_KEY
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
UBIQUIBOT_PUBLIC_KEY: ${{ secrets.UBIQUIBOT_PUBLIC_KEY }}

- name: Write Deployment URL to Summary
run: |
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ cypress/screenshots
.dev.vars
/tests/http/http-client.private.env.json
test-dashboard.md

.wrangler
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
72 changes: 34 additions & 38 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,52 @@

## [1.0.2](https://github.com/ubiquity-os/daemon-pricing/compare/v1.0.1...v1.0.2) (2024-08-20)


### Bug Fixes

* temporarily disable auth ([97c8b36](https://github.com/ubiquity-os/daemon-pricing/commit/97c8b364381d7bb1abf09ffe10f7f88a4ad9f4c6))
- temporarily disable auth ([97c8b36](https://github.com/ubiquity-os/daemon-pricing/commit/97c8b364381d7bb1abf09ffe10f7f88a4ad9f4c6))

## [1.0.1](https://github.com/ubiquity-os/daemon-pricing/compare/v1.0.0...v1.0.1) (2024-08-20)


### Bug Fixes

* updated manifest.json ([3aa6c14](https://github.com/ubiquity-os/daemon-pricing/commit/3aa6c14b3d250b7bb53a2ca4828049cf02318b8d))
- updated manifest.json ([3aa6c14](https://github.com/ubiquity-os/daemon-pricing/commit/3aa6c14b3d250b7bb53a2ca4828049cf02318b8d))

## 1.0.0 (2024-07-08)


### Features

* access and label tables ([78d96d9](https://github.com/ubiquity-os/daemon-pricing/commit/78d96d9485a79fc8c5d984d6967ecc90d86e3d64))
* action inputs ([abca8f0](https://github.com/ubiquity-os/daemon-pricing/commit/abca8f0d5b5fc353fb314f6d12e7a4db179dcd61))
* added release-please.yml workflow ([a494891](https://github.com/ubiquity-os/daemon-pricing/commit/a4948917b8a00deaa2fd000ac50ed4052ab7a8bd))
* assistive pricing ([2728e2e](https://github.com/ubiquity-os/daemon-pricing/commit/2728e2e102681deb30461e5b86a7648631d03276))
* check signature ([c149116](https://github.com/ubiquity-os/daemon-pricing/commit/c149116af230ba3e0f441f7a87b5651ecd10499d))
* database type generation ([e2c0f39](https://github.com/ubiquity-os/daemon-pricing/commit/e2c0f395ccc9b70e22a28d2e7b1e6ec906024b0d))
* env is now validated ([ecbf7ab](https://github.com/ubiquity-os/daemon-pricing/commit/ecbf7abbed3ccc2c1bc1bc82f5d9c6f08c153036))
* generating supabase types on build ([7978c60](https://github.com/ubiquity-os/daemon-pricing/commit/7978c606fc771b2642798ea815adbec30e582939))
* handle comment ([a4beb54](https://github.com/ubiquity-os/daemon-pricing/commit/a4beb5422df78b97ac32cd3349774b44f18762f4))
* now runs on cloudflare worker ([94d5bb7](https://github.com/ubiquity-os/daemon-pricing/commit/94d5bb710a90442db3642594c92049763464be6a))
* setup action ([0160a2f](https://github.com/ubiquity-os/daemon-pricing/commit/0160a2fc0afdde4bf75fc94aab633f9c14b1c472))
* setup node and pnpm ([5d3c1c1](https://github.com/ubiquity-os/daemon-pricing/commit/5d3c1c162405358fbb8e0bc7a50fe7ce37669803))
* supabase, typeguards ([63643dd](https://github.com/ubiquity-os/daemon-pricing/commit/63643dd73cd67c601cf2720ff9e97203806718c4))
* typebox for settings schema ([32250fe](https://github.com/ubiquity-os/daemon-pricing/commit/32250fedce4b0df64b8af33d8e5fe4274afba58d))

- access and label tables ([78d96d9](https://github.com/ubiquity-os/daemon-pricing/commit/78d96d9485a79fc8c5d984d6967ecc90d86e3d64))
- action inputs ([abca8f0](https://github.com/ubiquity-os/daemon-pricing/commit/abca8f0d5b5fc353fb314f6d12e7a4db179dcd61))
- added release-please.yml workflow ([a494891](https://github.com/ubiquity-os/daemon-pricing/commit/a4948917b8a00deaa2fd000ac50ed4052ab7a8bd))
- assistive pricing ([2728e2e](https://github.com/ubiquity-os/daemon-pricing/commit/2728e2e102681deb30461e5b86a7648631d03276))
- check signature ([c149116](https://github.com/ubiquity-os/daemon-pricing/commit/c149116af230ba3e0f441f7a87b5651ecd10499d))
- database type generation ([e2c0f39](https://github.com/ubiquity-os/daemon-pricing/commit/e2c0f395ccc9b70e22a28d2e7b1e6ec906024b0d))
- env is now validated ([ecbf7ab](https://github.com/ubiquity-os/daemon-pricing/commit/ecbf7abbed3ccc2c1bc1bc82f5d9c6f08c153036))
- generating supabase types on build ([7978c60](https://github.com/ubiquity-os/daemon-pricing/commit/7978c606fc771b2642798ea815adbec30e582939))
- handle comment ([a4beb54](https://github.com/ubiquity-os/daemon-pricing/commit/a4beb5422df78b97ac32cd3349774b44f18762f4))
- now runs on cloudflare worker ([94d5bb7](https://github.com/ubiquity-os/daemon-pricing/commit/94d5bb710a90442db3642594c92049763464be6a))
- setup action ([0160a2f](https://github.com/ubiquity-os/daemon-pricing/commit/0160a2fc0afdde4bf75fc94aab633f9c14b1c472))
- setup node and pnpm ([5d3c1c1](https://github.com/ubiquity-os/daemon-pricing/commit/5d3c1c162405358fbb8e0bc7a50fe7ce37669803))
- supabase, typeguards ([63643dd](https://github.com/ubiquity-os/daemon-pricing/commit/63643dd73cd67c601cf2720ff9e97203806718c4))
- typebox for settings schema ([32250fe](https://github.com/ubiquity-os/daemon-pricing/commit/32250fedce4b0df64b8af33d8e5fe4274afba58d))

### Bug Fixes

* added secrets for Supabase generation ([ba46893](https://github.com/ubiquity-os/daemon-pricing/commit/ba46893b28e114813ee576de61d32001cbc60502))
* added secrets for Supabase generation ([32a0d75](https://github.com/ubiquity-os/daemon-pricing/commit/32a0d75c9e372fb13c9ab308265eaa398d529cdd))
* change from inputs to env ([63a6eee](https://github.com/ubiquity-os/daemon-pricing/commit/63a6eeee3139018369134c10b3af256ea0aa9a71))
* check for membership before getting role ([3ac4014](https://github.com/ubiquity-os/daemon-pricing/commit/3ac401451b86f1c993644288cf5e179f43a6e045))
* comment ([3945ae4](https://github.com/ubiquity-os/daemon-pricing/commit/3945ae4c13d7c92260ffd5fc54a1c79758f3b4db))
* comment ([5d44e62](https://github.com/ubiquity-os/daemon-pricing/commit/5d44e6203ad621745ce526a9ec08db8bcd3cda26))
* cspell ([92bfa6e](https://github.com/ubiquity-os/daemon-pricing/commit/92bfa6e1303654e6e37c5b58776ba907413365b4))
* deployment and release are working properly ([d92e4c0](https://github.com/ubiquity-os/daemon-pricing/commit/d92e4c04b325bd761c5558e61ebd945088f1da2a))
* eslint and cspell ([130ed5a](https://github.com/ubiquity-os/daemon-pricing/commit/130ed5a1eabf2f11a81eca924d97ca140b6a3cf1))
* fixed TTY environment missing ([612c851](https://github.com/ubiquity-os/daemon-pricing/commit/612c851b7c51cce07903a6fad0a72bb5053c2a1e))
* label type ([7278e3b](https://github.com/ubiquity-os/daemon-pricing/commit/7278e3b14f1393cd0aa1b04b8fbb7a87e7a67b66))
* log instead of throw ([3c6ef5c](https://github.com/ubiquity-os/daemon-pricing/commit/3c6ef5c3b338ac8953cbdb33313e9c071fa04e9b))
* permission for public set label ([9687b71](https://github.com/ubiquity-os/daemon-pricing/commit/9687b718fd123623c3e825a648f777cb83f1b6a1))
* remove duplicates and ignore label already exists error ([1f2e3ff](https://github.com/ubiquity-os/daemon-pricing/commit/1f2e3ff0027cf9b95b3d3c26a2455151452c57ad))
* sample request ([83a3d83](https://github.com/ubiquity-os/daemon-pricing/commit/83a3d8385400cfd1cc85c7d3e2eb5d375144c859))
* spacing ([ead0dab](https://github.com/ubiquity-os/daemon-pricing/commit/ead0dab367a1a4126bb73027c5a1e4153230577a))
* switch statement ([c429aa2](https://github.com/ubiquity-os/daemon-pricing/commit/c429aa2eedaa583e769d8b2cc1196c32bbf768d8))
* tests ([4a9cfc3](https://github.com/ubiquity-os/daemon-pricing/commit/4a9cfc3e98f283e54daf3c01d6e016d216eec658))
- added secrets for Supabase generation ([ba46893](https://github.com/ubiquity-os/daemon-pricing/commit/ba46893b28e114813ee576de61d32001cbc60502))
- added secrets for Supabase generation ([32a0d75](https://github.com/ubiquity-os/daemon-pricing/commit/32a0d75c9e372fb13c9ab308265eaa398d529cdd))
- change from inputs to env ([63a6eee](https://github.com/ubiquity-os/daemon-pricing/commit/63a6eeee3139018369134c10b3af256ea0aa9a71))
- check for membership before getting role ([3ac4014](https://github.com/ubiquity-os/daemon-pricing/commit/3ac401451b86f1c993644288cf5e179f43a6e045))
- comment ([3945ae4](https://github.com/ubiquity-os/daemon-pricing/commit/3945ae4c13d7c92260ffd5fc54a1c79758f3b4db))
- comment ([5d44e62](https://github.com/ubiquity-os/daemon-pricing/commit/5d44e6203ad621745ce526a9ec08db8bcd3cda26))
- cspell ([92bfa6e](https://github.com/ubiquity-os/daemon-pricing/commit/92bfa6e1303654e6e37c5b58776ba907413365b4))
- deployment and release are working properly ([d92e4c0](https://github.com/ubiquity-os/daemon-pricing/commit/d92e4c04b325bd761c5558e61ebd945088f1da2a))
- eslint and cspell ([130ed5a](https://github.com/ubiquity-os/daemon-pricing/commit/130ed5a1eabf2f11a81eca924d97ca140b6a3cf1))
- fixed TTY environment missing ([612c851](https://github.com/ubiquity-os/daemon-pricing/commit/612c851b7c51cce07903a6fad0a72bb5053c2a1e))
- label type ([7278e3b](https://github.com/ubiquity-os/daemon-pricing/commit/7278e3b14f1393cd0aa1b04b8fbb7a87e7a67b66))
- log instead of throw ([3c6ef5c](https://github.com/ubiquity-os/daemon-pricing/commit/3c6ef5c3b338ac8953cbdb33313e9c071fa04e9b))
- permission for public set label ([9687b71](https://github.com/ubiquity-os/daemon-pricing/commit/9687b718fd123623c3e825a648f777cb83f1b6a1))
- remove duplicates and ignore label already exists error ([1f2e3ff](https://github.com/ubiquity-os/daemon-pricing/commit/1f2e3ff0027cf9b95b3d3c26a2455151452c57ad))
- sample request ([83a3d83](https://github.com/ubiquity-os/daemon-pricing/commit/83a3d8385400cfd1cc85c7d3e2eb5d375144c859))
- spacing ([ead0dab](https://github.com/ubiquity-os/daemon-pricing/commit/ead0dab367a1a4126bb73027c5a1e4153230577a))
- switch statement ([c429aa2](https://github.com/ubiquity-os/daemon-pricing/commit/c429aa2eedaa583e769d8b2cc1196c32bbf768d8))
- tests ([4a9cfc3](https://github.com/ubiquity-os/daemon-pricing/commit/4a9cfc3e98f283e54daf3c01d6e016d216eec658))
52 changes: 32 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,56 @@
Helps settings prices and adds label to the issues accordingly.

## Usage

Example of valid configuration:

```yml
- plugin: https://ubiquity-os-daemon-pricing.ubq.fi
type: github
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
- plugin: https://ubiquity-os-daemon-pricing.ubq.fi
type: github
Keyrxng marked this conversation as resolved.
Show resolved Hide resolved
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
```

## Running locally

### Supabase

Supabase can be started through the CLI running

```shell
supabase start
```

### Worker

Start the Worker by running

```shell
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

```json
{
"stateId": "",
Expand All @@ -53,12 +62,15 @@ looking like
"ref": ""
}
```

For convenience you can find an `.http` file with a valid request [here](/tests/http/request.http).

## Testing

### Jest

To start Jest tests, run

```shell
yarn test
```
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Delegate Compute"
description: "UbiquiBot Delegated Compute Action"
description: "UbiquityOS Delegated Compute Action"
outputs:
result: # id of output
description: "The result of a event handler"
Expand All @@ -13,4 +13,4 @@ runs:
shell: bash
- run: bun start
shell: bash
id: mainHandler
id: mainHandler
Binary file modified bun.lockb
Binary file not shown.
10 changes: 10 additions & 0 deletions dist/index.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dist/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
Loading