Skip to content

Commit

Permalink
chore: comment out supabase so it can run
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Jul 27, 2024
1 parent 1ec4cb4 commit 9a0037b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 22 deletions.
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,20 @@
- Your plugin config should look similar to this:

```yml
- plugin: <plugin-org/owner>/<plugin-repo-name>:compute.yml@development
name: plugin-name
id: plugin-name-command
description: "Plugin description" # small description of what the plugin does
command: "<regex for command>" # if you are creating a plugin with a slash command
example: "<example usage>" # 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: <plugin-org/owner>/<plugin-repo-name>: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.
Expand Down
4 changes: 2 additions & 2 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
}
4 changes: 2 additions & 2 deletions src/types/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions tests/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ function _createContext(
supabase: {} as ReturnType<typeof createAdapters>["supabase"],
} as ReturnType<typeof createAdapters>,
env: {
SUPABASE_KEY: "",
SUPABASE_URL: "",
} as Env,
octokit: octokit,
};
Expand Down

0 comments on commit 9a0037b

Please sign in to comment.