From 9a0037bc3a4799504ac2a527041170f421e9efe8 Mon Sep 17 00:00:00 2001 From: Keyrxng <106303466+Keyrxng@users.noreply.github.com> Date: Sat, 27 Jul 2024 10:06:35 +0100 Subject: [PATCH] chore: comment out supabase so it can run --- README.md | 30 ++++++++++++++---------------- src/plugin.ts | 4 ++-- src/types/env.ts | 4 ++-- tests/main.test.ts | 2 -- 4 files changed, 18 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index a010c0d..cfc45bb 100644 --- a/README.md +++ b/README.md @@ -24,22 +24,20 @@ - Your plugin config should look similar to this: ```yml -- plugin: /:compute.yml@development - name: plugin-name - id: plugin-name-command - description: "Plugin description" # small description of what the plugin does - command: "" # if you are creating a plugin with a slash command - example: "" # how to invoke the slash command - with: # these are the example settings, the kernel passes these to the plugin. - disabledCommands: [] - timers: - reviewDelayTolerance: 86000 - taskStaleTimeoutDuration: 2580000 - miscellaneous: - maxConcurrentTasks: 3 - labels: - time: [] - priority: [] +plugins: + "issue_comment.created": + - name: hello-world + id: hello-world + type: github + description: "A simple hello world plugin" # small description of what the plugin does + command: "\/hello" # if you are creating a plugin with a slash command + example: "/hello" # how to invoke the slash command + uses: + # - plugin: /:compute.yml@development + - plugin: http://localhost:4000 + with: + # Define configurables here and the kernel will pass these to the plugin. + configurableResponse: "Hello, is it me you are looking for?" ``` ###### At this stage, your plugin will fire on your defined events with the required settings passed in from the kernel. You can now start writing your plugin's logic. diff --git a/src/plugin.ts b/src/plugin.ts index 09c4102..a8df261 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -25,7 +25,7 @@ export async function runPlugin(context: Context) { */ export async function plugin(inputs: PluginInputs, env: Env) { const octokit = new Octokit({ auth: inputs.authToken }); - const supabase = createClient(env.SUPABASE_URL, env.SUPABASE_KEY); + // const supabase = createClient(env.SUPABASE_URL, env.SUPABASE_KEY); const context: Context = { eventName: inputs.eventName, @@ -39,7 +39,7 @@ export async function plugin(inputs: PluginInputs, env: Env) { // consider non-database storage solutions unless necessary // TODO: deprecate adapters/supabase from context. - context.adapters = createAdapters(supabase, context); + // context.adapters = createAdapters(supabase, context); return runPlugin(context); } \ No newline at end of file diff --git a/src/types/env.ts b/src/types/env.ts index 512e64e..9cdfb21 100644 --- a/src/types/env.ts +++ b/src/types/env.ts @@ -4,8 +4,8 @@ import "dotenv/config"; import { StandardValidator } from "typebox-validators"; export const envSchema = T.Object({ - SUPABASE_URL: T.String(), - SUPABASE_KEY: T.String(), + // SUPABASE_URL: T.String(), + // SUPABASE_KEY: T.String(), }); export const envValidator = new StandardValidator(envSchema); diff --git a/tests/main.test.ts b/tests/main.test.ts index 8de2736..1c438e2 100644 --- a/tests/main.test.ts +++ b/tests/main.test.ts @@ -154,8 +154,6 @@ function _createContext( supabase: {} as ReturnType["supabase"], } as ReturnType, env: { - SUPABASE_KEY: "", - SUPABASE_URL: "", } as Env, octokit: octokit, };