Skip to content

Commit

Permalink
Merge pull request ubq-testing#2 from Meniole/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
gentlementlegen authored Jul 7, 2024
2 parents 9bdf4c5 + 88b5431 commit 2cce223
Show file tree
Hide file tree
Showing 31 changed files with 9,733 additions and 9,229 deletions.
10 changes: 10 additions & 0 deletions .github/cspell.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const { exec } = require("child_process");

exec('cspell "**/*"', (error, stdout, stderr) => {
if (error) {
console.error(`exec error: ${error}`);
return;
}
if (stdout) console.log(`stdout: ${stdout}`);
if (stderr) console.error(`stderr: ${stderr}`);
});
3 changes: 2 additions & 1 deletion .github/workflows/worker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "20.10.0"
- uses: actions/checkout@v4
- uses: cloudflare/wrangler-action@v3
with:
wranglerVersion: "3.57.0"
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
secrets: |
SUPABASE_URL
SUPABASE_KEY
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `@ubiquibot/Command-Start-Stop`
# `@ubiquibot/command-start-stop`

This plugin allows a hunter to begin a task as well as gracefully stop a task without incurring a negative impact on the hunter's XP or karma.

Expand Down Expand Up @@ -32,17 +32,17 @@ To configure your Ubiquibot to run this plugin, add the following to the `.ubiqu
- plugin: http://localhost:4000 # or the URL where the plugin is hosted
name: start-stop
id: start-stop-command
type: github
description: "Allows a user to start/stop a bounty without negative XP impact"
command: "/(start|stop)"
example: "/start | /stop"
description: "Allows a user to start/stop a task without negative XP impact"
command: "\/start|\/stop"
example: "/start" # or "/stop"
with:
disabledCommands: []
isEnabled: true
timers:
reviewDelayTolerance: 86000
taskStaleTimeoutDuration: 2580000
miscellaneous:
maxConcurrentTasks: 3
startRequiresWallet: true # default is true
```
# Testing
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ubiquibot/command-start-stop",
"version": "1.0.0",
"description": "Enables the assignment of tasks to hunters and the graceful unassignment.",
"description": "Enables the assignment and graceful unassignment of tasks to contributors.",
"main": "build/index.ts",
"author": "Ubiquity DAO",
"license": "MIT",
Expand All @@ -14,7 +14,7 @@
"format": "run-s format:lint format:prettier format:cspell",
"format:lint": "eslint --fix .",
"format:prettier": "prettier --write .",
"format:cspell": "cspell **/*",
"format:cspell": "tsx .github/cspell.ts",
"knip": "knip --config .github/knip.ts",
"knip-ci": "knip --no-exit-code --reporter json --config .github/knip.ts",
"prepare": "husky install",
Expand All @@ -35,6 +35,7 @@
"@octokit/webhooks": "^13.1.0",
"@sinclair/typebox": "^0.32.5",
"@supabase/supabase-js": "2.42.0",
"@ubiquity-dao/ubiquibot-logger": "^1.2.0",
"dotenv": "^16.4.4",
"ms": "^2.1.3",
"typebox-validators": "^0.3.5"
Expand Down Expand Up @@ -67,7 +68,7 @@
"prettier": "^3.2.5",
"ts-jest": "29.1.2",
"tsx": "^4.7.1",
"typescript": "^5.3.3",
"typescript": "^5.5.2",
"wrangler": "3.57.0"
},
"lint-staged": {
Expand All @@ -83,5 +84,6 @@
"extends": [
"@commitlint/config-conventional"
]
}
},
"packageManager": "[email protected]"
}
5 changes: 1 addition & 4 deletions src/adapters/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { SupabaseClient } from "@supabase/supabase-js";
import { Context } from "../types/context";
import { User } from "./supabase/helpers/user";
import { Super } from "./supabase/helpers/supabase";
import { Database } from "./supabase/types/database";

export function createAdapters(supabaseClient: SupabaseClient<Database>, context: Context) {
export function createAdapters(supabaseClient: SupabaseClient, context: Context) {
return {
supabase: {
user: new User(supabaseClient, context),
super: new Super(supabaseClient, context),
},
};
}
Loading

0 comments on commit 2cce223

Please sign in to comment.