Skip to content

Commit

Permalink
Merge pull request #17 from gentlementlegen/development
Browse files Browse the repository at this point in the history
refactor: update references from ubiquibot to ubiquity-os
  • Loading branch information
gentlementlegen authored Oct 21, 2024
2 parents b8091a0 + be3c482 commit e2ffca6
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/handlers/command-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class CommandParser {
program
.command("/query")
.usage("@<username>")
.argument("<username>", "User name to query, e.g. @ubiquibot", this._parseUser)
.argument("<username>", "User name to query, e.g. @UbiquityOS", this._parseUser)
.action((username) => queryUser(context, username))
.helpCommand(false)
.exitOverride()
Expand Down
2 changes: 2 additions & 0 deletions src/types/env.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { StaticDecode, Type as T } from "@sinclair/typebox";
import { LOG_LEVEL } from "@ubiquity-os/ubiquity-os-logger";

export const envSchema = T.Object({
SUPABASE_URL: T.String(),
SUPABASE_KEY: T.String(),
KERNEL_PUBLIC_KEY: T.Optional(T.String()),
LOG_LEVEL: T.Enum(LOG_LEVEL, { default: LOG_LEVEL.INFO }),
});

export type Env = StaticDecode<typeof envSchema>;
2 changes: 0 additions & 2 deletions src/types/plugin-input.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { StaticDecode, Type as T } from "@sinclair/typebox";
import { LOG_LEVEL } from "@ubiquity-os/ubiquity-os-logger";

export const pluginSettingsSchema = T.Object({
/**
* Allows any user to query anyone else. If false, only org members can query others.
*/
allowPublicQuery: T.Optional(T.Boolean({ default: true })),
logLevel: T.Optional(T.Enum(LOG_LEVEL, { default: LOG_LEVEL.INFO })),
});

export type PluginSettings = StaticDecode<typeof pluginSettingsSchema>;
2 changes: 1 addition & 1 deletion tests/__mocks__/payloads/comment-created.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"created_at": "2024-05-19T11:54:23Z",
"updated_at": "2024-05-19T11:54:23Z",
"author_association": "CONTRIBUTOR",
"body": "/query @ubiquibot",
"body": "/query @UbiquityOS",
"reactions": {
"url": "https://api.github.com/repos/ubiquibot/comment-query-user/issues/comments/2119208855/reactions",
"total_count": 0,
Expand Down
2 changes: 1 addition & 1 deletion tests/http/request.http
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# org_name: the organization you want to post to, e.g. "ubiquibot"
# repo_name: the target repository, e.g "command-query-user"
# issue_number: the number of the issue, same as the one you would see in the url to that issue, e.g. "1"
# command: the command you want to test, e.g. "/query @ubiquibot"
# command: the command you want to test, e.g. "/query @UbiquityOS"
# token: a valid GitHub token for auth, e.g. "ghs_xxxxx"

### POST a successful issue_comment.created request to the Worker
Expand Down
2 changes: 1 addition & 1 deletion tests/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe("User tests", () => {
...commentCreatedPayload,
comment: {
...commentCreatedPayload.comment,
body: "/foobar @ubiquibot",
body: "/foobar @UbiquityOS",
},
},
env: {
Expand Down

0 comments on commit e2ffca6

Please sign in to comment.