Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QA 2 #4

Open
wants to merge 109 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
b13ab8a
chore: updated generated configuration
ubiquity-os[bot] Oct 31, 2024
30396e8
chore: update tests
kingsley-einstein Nov 1, 2024
255adec
chore: update tests
kingsley-einstein Nov 1, 2024
edcccd3
chore: update tests
kingsley-einstein Nov 1, 2024
b59a754
chore: updated generated configuration
ubiquity-os[bot] Nov 1, 2024
7ed9b96
chore: update worker file - append necessary keys to webhook payload
kingsley-einstein Nov 1, 2024
d63f64a
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 1, 2024
a84e69c
chore: updated generated configuration
ubiquity-os[bot] Nov 1, 2024
6b0e649
chore: fix stats issue
kingsley-einstein Nov 1, 2024
c1cea68
chore: fix stats issue
kingsley-einstein Nov 1, 2024
b23877e
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 1, 2024
ca8773d
chore: updated generated configuration
ubiquity-os[bot] Nov 1, 2024
4cedae5
chore: track issue events
kingsley-einstein Nov 3, 2024
e5caa73
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 3, 2024
26dbe85
chore: updated generated configuration
ubiquity-os[bot] Nov 3, 2024
2d3cdc1
chore: track issue events
kingsley-einstein Nov 3, 2024
5ffedbe
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 3, 2024
db0c53f
chore: updated generated configuration
ubiquity-os[bot] Nov 3, 2024
d7819c4
chore: made requested updates
kingsley-einstein Nov 5, 2024
19fc446
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 5, 2024
7e17049
chore: made updates
kingsley-einstein Nov 11, 2024
83e72fe
chore: updated generated configuration
ubiquity-os[bot] Nov 11, 2024
b2e672a
chore: made updates
kingsley-einstein Nov 15, 2024
05dda18
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 15, 2024
d27dc72
chore: fix tests, and formatting
kingsley-einstein Nov 25, 2024
047e550
chore: updated generated configuration
ubiquity-os[bot] Nov 25, 2024
c4c544a
chore: convert to plugin
kingsley-einstein Nov 26, 2024
0c0caf2
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 26, 2024
21ae8a9
chore: convert to plugin
kingsley-einstein Nov 26, 2024
972f52d
chore: convert to plugin
kingsley-einstein Nov 26, 2024
650bf41
chore: updated generated configuration
ubiquity-os[bot] Nov 26, 2024
9397438
chore: updates
kingsley-einstein Nov 26, 2024
5dc0cae
chore: updates
kingsley-einstein Nov 26, 2024
68527bc
chore: updated generated configuration
ubiquity-os[bot] Nov 26, 2024
94ce85e
chore: updates
kingsley-einstein Nov 26, 2024
bb7c0e2
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 26, 2024
458b093
chore: updates
kingsley-einstein Nov 26, 2024
1399c69
chore: updated generated configuration
ubiquity-os[bot] Nov 26, 2024
519b9b4
chore: updates
kingsley-einstein Nov 26, 2024
db764c8
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 26, 2024
d05fb81
chore: updates
kingsley-einstein Nov 26, 2024
7436032
chore: updated generated configuration
ubiquity-os[bot] Nov 26, 2024
cd9df0a
chore: dev
kingsley-einstein Nov 26, 2024
9c6f719
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 26, 2024
f3173b7
chore: dev
kingsley-einstein Nov 26, 2024
d57a968
chore: updated generated configuration
ubiquity-os[bot] Nov 26, 2024
9315a95
chore: dev
kingsley-einstein Nov 26, 2024
f7cba36
chore: updated generated configuration
ubiquity-os[bot] Nov 26, 2024
ef10010
chore: updates
kingsley-einstein Nov 26, 2024
50c3a99
chore: updated generated configuration
ubiquity-os[bot] Nov 26, 2024
fc33279
chore: manifest
kingsley-einstein Nov 26, 2024
2053f51
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 26, 2024
3a02caa
chore: manifest
kingsley-einstein Nov 26, 2024
df4442b
chore: manifest
kingsley-einstein Nov 26, 2024
39728a0
chore: updated generated configuration
ubiquity-os[bot] Nov 26, 2024
e22e798
chore: manifest
kingsley-einstein Nov 26, 2024
76d4ede
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 26, 2024
35be950
chore: manifest
kingsley-einstein Nov 26, 2024
e077e27
chore: updated generated configuration
ubiquity-os[bot] Nov 26, 2024
0b6666a
chore: new url
kingsley-einstein Nov 26, 2024
1ec8023
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 26, 2024
c886b79
chore: new url
kingsley-einstein Nov 26, 2024
053c4ea
chore: updated generated configuration
ubiquity-os[bot] Nov 26, 2024
b08d7de
chore: updates
kingsley-einstein Nov 26, 2024
75e2d78
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 26, 2024
63e85e0
chore: updates
kingsley-einstein Nov 26, 2024
adf5a7e
chore: updated generated configuration
ubiquity-os[bot] Nov 26, 2024
41760f0
chore: updates
kingsley-einstein Nov 26, 2024
dc389fc
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 26, 2024
91ed08f
chore: updates
kingsley-einstein Nov 26, 2024
b084d27
chore: updated generated configuration
ubiquity-os[bot] Nov 26, 2024
900ae2e
chore: updates
kingsley-einstein Nov 26, 2024
c315c1b
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 26, 2024
4fa0e55
chore: updates
kingsley-einstein Nov 26, 2024
da2cc9d
chore: updated generated configuration
ubiquity-os[bot] Nov 26, 2024
617ef43
chore: updates
kingsley-einstein Nov 26, 2024
fb0671b
chore: updates
kingsley-einstein Nov 26, 2024
984c514
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 26, 2024
524807b
chore: updates
kingsley-einstein Nov 26, 2024
a6ee757
chore: updated generated configuration
ubiquity-os[bot] Nov 26, 2024
37cdc03
chore: platform.sh
kingsley-einstein Nov 26, 2024
4e48186
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Nov 26, 2024
7c6ea0b
chore: manifest
kingsley-einstein Nov 26, 2024
91bcde2
chore: deploy to koyeb
kingsley-einstein Nov 27, 2024
616f5bc
chore: updated generated configuration
ubiquity-os[bot] Nov 27, 2024
96f88d1
chore: manifest
kingsley-einstein Nov 27, 2024
7368a20
chore: updated generated configuration
ubiquity-os[bot] Nov 27, 2024
1aae776
chore: manifest
kingsley-einstein Nov 27, 2024
ab41864
chore: updated generated configuration
ubiquity-os[bot] Nov 27, 2024
fe46897
chore: manifest
kingsley-einstein Nov 27, 2024
06d2bdc
chore: updated generated configuration
ubiquity-os[bot] Nov 27, 2024
29a9dd1
chore: manifest
kingsley-einstein Nov 27, 2024
7ee70e2
chore: updated generated configuration
ubiquity-os[bot] Nov 27, 2024
4fc18bd
chore: made fx
kingsley-einstein Dec 4, 2024
c7489d3
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Dec 4, 2024
ff18936
chore: fixes
kingsley-einstein Dec 4, 2024
403444a
chore: updated generated configuration
ubiquity-os[bot] Dec 4, 2024
907d6a0
chore: made fix
kingsley-einstein Dec 4, 2024
32cda98
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Dec 4, 2024
aded7a6
chore: made fix
kingsley-einstein Dec 4, 2024
df2696b
chore: updated generated configuration
ubiquity-os[bot] Dec 4, 2024
bc89c84
chore: made updates
kingsley-einstein Dec 16, 2024
6834472
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Dec 16, 2024
8b760a7
chore: made updates
kingsley-einstein Dec 16, 2024
b0b32a8
chore: updated generated configuration
ubiquity-os[bot] Dec 16, 2024
ef22145
chore: made updates
kingsley-einstein Dec 16, 2024
cfa02a5
Merge branch 'local-development' of github.com:kingsley-einstein/cont…
kingsley-einstein Dec 16, 2024
11afdeb
chore: made updates
kingsley-einstein Dec 22, 2024
94a406d
chore: updated generated configuration
ubiquity-os[bot] Dec 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .cspell.json
100644 → 100755
Empty file.
Empty file modified .dev.vars.example
100644 → 100755
Empty file.
Empty file modified .env.example
100644 → 100755
Empty file.
8 changes: 8 additions & 0 deletions .github/.ubiquity-os.config.dev.yml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
plugins:
- uses:
- plugin: https://damaged-alysa-moniswap-b2f3cc8b.koyeb.app
with:
disabledCommands: []
miscellaneous:
maxConcurrentTasks: 3
runsOn: ["issue_comment", "issue_comment.created", "issue_comment.edited"]
Empty file modified .github/CODEOWNERS
100644 → 100755
Empty file.
Empty file modified .github/knip.ts
100644 → 100755
Empty file.
Empty file modified .github/pull_request_template.md
100644 → 100755
Empty file.
Empty file modified .github/workflows/build.yml
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion .github/workflows/compute.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "the name of the plugin"
name: "ubiquity-contribs-scanner"

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: "ubiquity-contribs-scanner"
name: "ubiquity-contributions-scanner"

on:
workflow_dispatch:
Expand Down
Empty file modified .github/workflows/conventional-commits.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/formatting-checks.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/jest-testing.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/knip-reporter.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/knip.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/release-please.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/update-configuration.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/worker-delete.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/worker-deploy.yml
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ cypress/screenshots
script.ts
.wrangler
test-dashboard.md
.platform*
*Dockerfile*
.dockerignore
Empty file modified .husky/commit-msg
100644 → 100755
Empty file.
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
Empty file modified .nvmrc
100644 → 100755
Empty file.
Empty file modified .prettierrc
100644 → 100755
Empty file.
Empty file modified .yarnrc.yml
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion eslint.config.mjs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default tsEslint.config({
"@typescript-eslint": tsEslint.plugin,
"check-file": checkFile,
},
ignores: [".github/knip.ts"],
ignores: [".github/knip.ts", "coverage/**/*.js"],
extends: [eslint.configs.recommended, ...tsEslint.configs.recommended, sonarjs.configs.recommended],
languageOptions: {
parser: tsEslint.parser,
Expand Down
Empty file modified jest.config.json
100644 → 100755
Empty file.
24 changes: 15 additions & 9 deletions manifest.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
{
"name": "ts-template",
"description": "ts-template for UbiquityOS plugins.",
"ubiquity:listeners": ["issue_comment.created", "issue_comment.deleted", "issue_comment.edited"],
"name": "scan-contributions",
"description": "UbiquityOS plugin for scanning contributions based on issues/pulls.",
"ubiquity:listeners": [
"issue_comment.created",
"issue_comment.edited",
"issue_comment"
],
"commands": {
"command1": {
"ubiquity:example": "/command1 argument",
"description": "Command 1 with an argument."
"scanContributions": {
"ubiquity:example": "/scanContributions",
"description": "Slash command that maps the names of contributors to events executed within a repo's context."
}
},
"configuration": {
"default": {
"configurableResponse": "Hello, world!"
"configurableResponse": "This is the UbiquityOS contributions scanner."
},
"type": "object",
"properties": {
Expand All @@ -21,6 +25,8 @@
"type": "string"
}
},
"required": ["configurableResponse"]
"required": [
"configurableResponse"
]
}
}
}
Empty file modified package.json
100644 → 100755
Empty file.
68 changes: 0 additions & 68 deletions src/handlers/hello-world.ts

This file was deleted.

165 changes: 165 additions & 0 deletions src/handlers/scan-contributions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
import { Context } from "../types";

export async function scanContributions(context: Context) {
const { logger, payload, octokit } = context;

const store: Record<string, Record<string, number>> = {};

const repo = payload.repository.name;
const issueNumber = payload.issue.number;
const owner = payload.repository.owner.login;
const body = payload.comment.body;

if (!body.match(/scanContributions/i)) {
return;
}

logger.info("Scanning Events!");

try {
const contributors = await octokit.repos.listContributors({
repo,
owner,
});

contributors.data.forEach((contributor) => {
if (contributor.login) {
store[contributor.login] = {};
}
});

const issueTimelineEvents = await octokit.paginate(octokit.issues.listEventsForTimeline, { owner, repo, issue_number: issueNumber });
const issueEvents = await octokit.paginate(octokit.issues.listEvents, { owner, repo, issue_number: issueNumber });
const issueReactionEvents = await octokit.paginate(octokit.reactions.listForIssue, { owner, repo, issue_number: issueNumber });
const issueCommentEvents = await octokit.paginate(octokit.issues.listComments, { owner, repo, issue_number: issueNumber });

issueTimelineEvents.forEach((ev) => {
if ("actor" in ev && ev.actor && !store[ev.actor.login]) {
store[ev.actor.login] = {};
}

if ("actor" in ev && ev.actor) {
const key = (payload.issue.pull_request ? "pull_request." : "issues.").concat(ev.event);
if (!store[ev.actor.login][key]) store[ev.actor.login][key] = 1;
else store[ev.actor.login][key] += 1;
}
});

issueEvents.forEach((ev) => {
if (ev.actor && !store[ev.actor.login]) {
store[ev.actor.login] = {};
}

if (ev.actor && !issueTimelineEvents.map((te) => te.event).includes(ev.event)) {
const key = (payload.issue.pull_request ? "pull_request." : "issues.").concat(ev.event);
if (!store[ev.actor.login][key]) store[ev.actor.login][key] = 1;
else store[ev.actor.login][key] += 1;
}
});

issueReactionEvents.forEach((ev) => {
if (ev.user && !store[ev.user.login]) {
store[ev.user.login] = {};
}
if (ev.user) {
if (!store[ev.user.login][ev.content]) store[ev.user.login][ev.content] = 1;
else store[ev.user.login][ev.content] += 1;
}
});

for (const issueCommentEvent of issueCommentEvents) {
const reactions = await octokit.paginate(octokit.reactions.listForIssueComment, { owner, repo, comment_id: issueCommentEvent.id });

reactions.forEach((reaction) => {
if (reaction.user && !store[reaction.user.login]) {
store[reaction.user.login] = {};
}

if (reaction.user) {
if (!store[reaction.user.login][reaction.content]) store[reaction.user.login][reaction.content] = 1;
else store[reaction.user.login][reaction.content] += 1;
}
});
}

if (payload.issue.pull_request) {
const pullReviews = await octokit.paginate(octokit.pulls.listReviews, { owner, repo, pull_number: issueNumber });
const pullReviewComments = await octokit.paginate(octokit.pulls.listReviewComments, { owner, repo, pull_number: issueNumber });

for (const pullReview of pullReviews) {
if (pullReview.user && !store[pullReview.user.login]) {
store[pullReview.user.login] = {};
}

if (pullReview.user) {
const key = "pull_request_review.".concat(pullReview.state.toLowerCase());
if (!store[pullReview.user.login][key]) store[pullReview.user.login][key] = 1;
else store[pullReview.user.login][key] += 1;
}
}

for (const pullReviewComment of pullReviewComments) {
if (pullReviewComment.user && !store[pullReviewComment.user.login]) {
store[pullReviewComment.user.login] = {};
}

const key = "pull_request_review_comment.created";

if (pullReviewComment.user) {
if (!store[pullReviewComment.user.login][key]) store[pullReviewComment.user.login][key] = 1;
else store[pullReviewComment.user.login][key] += 1;
}

const reactions = await octokit.paginate(octokit.reactions.listForPullRequestReviewComment, { owner, repo, comment_id: pullReviewComment.id });

reactions.forEach((reaction) => {
if (reaction.user && !store[reaction.user.login]) {
store[reaction.user.login] = {};
}

if (reaction.user) {
if (!store[reaction.user.login][reaction.content]) store[reaction.user.login][reaction.content] = 1;
else store[reaction.user.login][reaction.content] += 1;
}
});
}
}

logger.info("Contributions stats: ", store);
const octokitCommentBody = "```json\n" + JSON.stringify(store, undefined, 2) + "\n```";

await octokit.issues.createComment({
owner,
repo,
issue_number: issueNumber,
body: octokitCommentBody,
});
} catch (error) {
if (error instanceof Error) {
const octokitCommentBody =
"An error occurred while scanning this repository\n ```json\n" + JSON.stringify({ error: error, stack: error.stack }, undefined, 2) + "\n```";
await octokit.issues.createComment({
owner,
repo,
issue_number: issueNumber,
body: octokitCommentBody,
});
logger.error(`Error creating comment:`, { error: error, stack: error.stack });
throw error;
} else {
const octokitCommentBody =
"An error occurred while scanning this repository\n ```json\n" + JSON.stringify({ err: error, error: new Error() }, undefined, 2) + "\n```";
await octokit.issues.createComment({
owner,
repo,
issue_number: issueNumber,
body: octokitCommentBody,
});
logger.error(`Error creating comment:`, { err: error, error: new Error() });
throw error;
}
}

logger.ok(`Successfully scanned contributions!`, { repo, issueNumber });
logger.verbose(`Exiting scanContributions`);
}
15 changes: 10 additions & 5 deletions src/helpers/validator.ts
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import * as github from "@actions/github";
import { Octokit } from "@octokit/rest";
import { TransformDecodeCheckError, TransformDecodeError, Value, ValueError } from "@sinclair/typebox/value";
import { Env, envSchema, envValidator, PluginSettings, pluginSettingsSchema, pluginSettingsValidator } from "../types";
import { Context, Env, envSchema, envValidator, PluginSettings, pluginSettingsSchema, pluginSettingsValidator } from "../types";

export async function returnDataToKernel(repoToken: string, stateId: string, output: object, eventType = "return-data-to-ubiquity-os-kernel") {
export async function returnDataToKernel(
repoToken: string,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is obsolete and would be handled by the SDK.

stateId: string,
output: object,
context: Context,
eventType = "return-data-to-ubiquity-os-kernel"
) {
const octokit = new Octokit({ auth: repoToken });
return octokit.repos.createDispatchEvent({
owner: github.context.repo.owner,
repo: github.context.repo.repo,
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
event_type: eventType,
client_payload: {
state_id: stateId,
Expand Down
Empty file modified src/main.ts
100644 → 100755
Empty file.
9 changes: 6 additions & 3 deletions src/plugin.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import { returnDataToKernel } from "./helpers/validator";
import { Env, PluginInputs } from "./types";
import { Context } from "./types";
import { isIssueCommentEvent } from "./types/typeguards";
import { helloWorld } from "./handlers/hello-world";
import { scanContributions } from "./handlers/scan-contributions";
import { LogLevel, Logs } from "@ubiquity-dao/ubiquibot-logger";
import dotenv from "dotenv";

dotenv.config();

/**
* The main plugin function. Split for easier testing.
Expand All @@ -13,7 +16,7 @@ export async function runPlugin(context: Context) {
const { logger, eventName } = context;

if (isIssueCommentEvent(context)) {
return await helloWorld(context);
return await scanContributions(context);
}

logger.error(`Unsupported event: ${eventName}`);
Expand Down Expand Up @@ -46,5 +49,5 @@ export async function plugin(inputs: PluginInputs, env: Env) {
*/

await runPlugin(context);
return returnDataToKernel(process.env.GITHUB_TOKEN, inputs.stateId, {});
return returnDataToKernel(process.env.GITHUB_TOKEN, inputs.stateId, {}, context);
}
2 changes: 1 addition & 1 deletion src/types/context.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Logs } from "@ubiquity-dao/ubiquibot-logger";
*
* ubiquity:listeners: ["issue_comment.created", ...]
*/
export type SupportedEventsU = "issue_comment.created" | "issue_comment.deleted" | "issue_comment.edited";
export type SupportedEventsU = "issue_comment.created" | "issue_comment.edited";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to listen to these events but rather issue closed.


export type SupportedEvents = {
[K in SupportedEventsU]: K extends WebhookEventName ? WebhookEvent<K> : never;
Expand Down
Empty file modified src/types/env.ts
100644 → 100755
Empty file.
Empty file modified src/types/index.ts
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/types/plugin-inputs.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const pluginSettingsSchema = T.Object(
configurableResponse: T.String(),
customStringsUrl: T.Optional(T.String()),
},
{ default: { configurableResponse: "Hello, world!" } }
{ default: { configurableResponse: "This is the UbiquityOS contributions scanner." } }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed.

);

export const pluginSettingsValidator = new StandardValidator(pluginSettingsSchema);
Expand Down
Empty file modified src/types/process-env.d.ts
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions src/types/typeguards.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ import { Context } from "./context";
/**
* Restricts the scope of `context` to the `issue_comment.created` payload.
*/
export function isIssueCommentEvent(context: Context): context is Context<"issue_comment.created"> {
return context.eventName === "issue_comment.created";
export function isIssueCommentEvent(context: Context): context is Context<"issue_comment.created" | "issue_comment.edited"> {
return context.eventName === "issue_comment.created" || context.eventName === "issue_comment.edited";
}
Loading
Loading