From 3f78eb1017efc3d1f58a5d676084f23106cc43c8 Mon Sep 17 00:00:00 2001 From: Mentlegen <9807008+gentlementlegen@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:54:54 +0900 Subject: [PATCH 1/9] chore: manifest.json --- manifest.json | 11 +++++++++++ src/worker.ts | 9 +++++++++ 2 files changed, 20 insertions(+) create mode 100644 manifest.json diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..88c8246 --- /dev/null +++ b/manifest.json @@ -0,0 +1,11 @@ +{ + "name": "Wallet", + "description": "Allows users to register their wallets to collect rewards.", + "commands": [ + { + "command": "/wallet", + "example": "/wallet ubiquibot.eth", + "description": "Wallet address to query, e.g. 0x000000000000000000000000000000000000001 or ubiquibot.eth" + } + ] +} diff --git a/src/worker.ts b/src/worker.ts index 9d9ee97..53439d1 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -1,10 +1,19 @@ import { Value } from "@sinclair/typebox/value"; import { plugin } from "./plugin"; import { Env, envValidator, pluginSettingsSchema, pluginSettingsValidator } from "./types"; +import manifest from "../manifest.json"; export default { async fetch(request: Request, env: Env): Promise { try { + if (request.method === "GET") { + const url = new URL(request.url); + if (url.pathname === "/manifest.json") { + return new Response(JSON.stringify(manifest), { + headers: { "content-type": "application/json" }, + }); + } + } if (request.method !== "POST") { return new Response(JSON.stringify({ error: `Only POST requests are supported.` }), { status: 405, From 5feaa2f9b05a19602db375f8d8facbaa47fcedf6 Mon Sep 17 00:00:00 2001 From: Mentlegen <9807008+gentlementlegen@users.noreply.github.com> Date: Wed, 10 Jul 2024 12:51:38 +0900 Subject: [PATCH 2/9] chore: manifest.json --- manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 88c8246..a07adf7 100644 --- a/manifest.json +++ b/manifest.json @@ -4,8 +4,8 @@ "commands": [ { "command": "/wallet", - "example": "/wallet ubiquibot.eth", - "description": "Wallet address to query, e.g. 0x000000000000000000000000000000000000001 or ubiquibot.eth" + "example": "/wallet ubq.eth", + "description": "Register your wallet address for payments." } ] } From 974ae98390b0b80b6e9491aa02b23aea30a6fa66 Mon Sep 17 00:00:00 2001 From: Mentlegen <9807008+gentlementlegen@users.noreply.github.com> Date: Thu, 11 Jul 2024 13:06:25 +0900 Subject: [PATCH 3/9] chore: manifest.json --- manifest.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index a07adf7..7157e31 100644 --- a/manifest.json +++ b/manifest.json @@ -1,11 +1,10 @@ { "name": "Wallet", "description": "Allows users to register their wallets to collect rewards.", - "commands": [ - { - "command": "/wallet", + "commands": { + "wallet": { "example": "/wallet ubq.eth", "description": "Register your wallet address for payments." } - ] + } } From 6485a56a148535412cc4ddfa3de8d03949fa663a Mon Sep 17 00:00:00 2001 From: Mentlegen <9807008+gentlementlegen@users.noreply.github.com> Date: Thu, 11 Jul 2024 21:08:15 +0900 Subject: [PATCH 4/9] chore: manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 7157e31..698dc8b 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "description": "Allows users to register their wallets to collect rewards.", "commands": { "wallet": { - "example": "/wallet ubq.eth", + "ubiquity:example": "/wallet ubq.eth", "description": "Register your wallet address for payments." } } From 0402eb770d531f199783a373c07f0bbfaa541d89 Mon Sep 17 00:00:00 2001 From: Mentlegen <9807008+gentlementlegen@users.noreply.github.com> Date: Fri, 12 Jul 2024 13:19:51 +0900 Subject: [PATCH 5/9] Update manifest.json --- manifest.json | 1 + 1 file changed, 1 insertion(+) diff --git a/manifest.json b/manifest.json index 7157e31..a4e1db6 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,7 @@ { "name": "Wallet", "description": "Allows users to register their wallets to collect rewards.", + "ubiquity:runsOn": [ "issue_comment.created" ], "commands": { "wallet": { "example": "/wallet ubq.eth", From c43241ace3b18856612defe52f97160b928a0eaa Mon Sep 17 00:00:00 2001 From: Mentlegen <9807008+gentlementlegen@users.noreply.github.com> Date: Fri, 12 Jul 2024 13:26:43 +0900 Subject: [PATCH 6/9] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index a4e1db6..7f2f6fe 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "Wallet", "description": "Allows users to register their wallets to collect rewards.", - "ubiquity:runsOn": [ "issue_comment.created" ], + "ubiquibot:listeners": [ "issue_comment.created" ], "commands": { "wallet": { "example": "/wallet ubq.eth", From ad4a3bbf14112c6e43a8ec7f7e404a23d09b6281 Mon Sep 17 00:00:00 2001 From: Mentlegen <9807008+gentlementlegen@users.noreply.github.com> Date: Fri, 12 Jul 2024 13:28:39 +0900 Subject: [PATCH 7/9] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 7f2f6fe..ff9b920 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ "ubiquibot:listeners": [ "issue_comment.created" ], "commands": { "wallet": { - "example": "/wallet ubq.eth", + "ubiquibot:example": "/wallet ubq.eth", "description": "Register your wallet address for payments." } } From 7ccd1618019d813387864a3680a5eee1c3d841a0 Mon Sep 17 00:00:00 2001 From: Mentlegen <9807008+gentlementlegen@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:58:17 +0900 Subject: [PATCH 8/9] chore: manifest.json --- manifest.json | 1 + 1 file changed, 1 insertion(+) diff --git a/manifest.json b/manifest.json index 698dc8b..2b9db4c 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,7 @@ { "name": "Wallet", "description": "Allows users to register their wallets to collect rewards.", + "ubiquibot:listeners": [ "issue_comment.created" ], "commands": { "wallet": { "ubiquity:example": "/wallet ubq.eth", From 5f3d488cd86a59a459fc5dd8d8ae072773aa9afc Mon Sep 17 00:00:00 2001 From: Mentlegen <9807008+gentlementlegen@users.noreply.github.com> Date: Tue, 16 Jul 2024 13:34:19 +0900 Subject: [PATCH 9/9] chore: manifest.json --- manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index ff9b920..dce94b3 100644 --- a/manifest.json +++ b/manifest.json @@ -1,10 +1,10 @@ { "name": "Wallet", "description": "Allows users to register their wallets to collect rewards.", - "ubiquibot:listeners": [ "issue_comment.created" ], + "ubiquity:listeners": [ "issue_comment.created" ], "commands": { "wallet": { - "ubiquibot:example": "/wallet ubq.eth", + "ubiquity:example": "/wallet ubq.eth", "description": "Register your wallet address for payments." } }