diff --git a/.cspell.json b/.cspell.json index 6bf60054..dc5f3e9a 100644 --- a/.cspell.json +++ b/.cspell.json @@ -1,10 +1,10 @@ { "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", "version": "0.2", - "ignorePaths": ["**/*.json", "**/*.css", "node_modules", "**/*.log"], + "ignorePaths": ["**/*.json", "**/*.css", "node_modules", "**/*.log", "**/tests/__mocks__"], "useGitignore": true, "language": "en", - "words": ["dataurl", "devpool", "outdir", "servedir", "ubiquibot", "tiktoken", "typebox", "supabase", "wxdai", "noopener"], + "words": ["dataurl", "devpool", "outdir", "servedir", "ubiquibot", "tiktoken", "typebox", "supabase", "wxdai", "noopener", "knip", "hellip"], "dictionaries": ["typescript", "node", "software-terms"], "import": ["@cspell/dict-typescript/cspell-ext.json", "@cspell/dict-node/cspell-ext.json", "@cspell/dict-software-terms"], "ignoreRegExpList": ["[0-9a-fA-F]{6}"] diff --git a/.github/workflows/jest-testing.yml b/.github/workflows/jest-testing.yml index d85a19d6..a406f422 100644 --- a/.github/workflows/jest-testing.yml +++ b/.github/workflows/jest-testing.yml @@ -15,6 +15,9 @@ jobs: SUPABASE_URL: ${{ secrets.SUPABASE_URL }} SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }} X25519_PRIVATE_KEY: ${{ secrets.X25519_PRIVATE_KEY }} + NFT_MINTER_PRIVATE_KEY: ${{ secrets.NFT_MINTER_PRIVATE_KEY }} + NFT_CONTRACT_ADDRESS: ${{ secrets.NFT_CONTRACT_ADDRESS }} + EVM_PRIVATE_ENCRYPTED: ${{ secrets.EVM_PRIVATE_ENCRYPTED }} steps: - name: Checkout code diff --git a/knip.ts b/knip.ts index e7f75a5d..c066ee07 100644 --- a/knip.ts +++ b/knip.ts @@ -5,7 +5,7 @@ const config: KnipConfig = { project: ["src/**/*.ts"], ignore: ["src/data-collection/examples/*.ts", "src/configuration/common-config-type.ts"], ignoreExportsUsedInFile: true, - ignoreDependencies: ["ts-node", "msw"], + ignoreDependencies: ["ts-node", "msw", "@mswjs/data"], jest: { config: ["jest.config.ts"], entry: ["src/**/*.test.ts"], diff --git a/package.json b/package.json index aaf667b1..b998a3d9 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@octokit/rest": "20.1.0", "@sinclair/typebox": "0.32.20", "@supabase/supabase-js": "2.42.0", - "@ubiquibot/permit-generation": "1.2.1", + "@ubiquibot/permit-generation": "1.2.2", "commander": "12.0.0", "decimal.js": "10.4.3", "dotenv": "16.4.5", @@ -50,6 +50,7 @@ "@cspell/dict-node": "4.0.3", "@cspell/dict-software-terms": "3.3.18", "@cspell/dict-typescript": "3.1.2", + "@mswjs/data": "0.16.1", "@types/jest": "29.5.12", "@types/jsdom": "21.1.6", "@types/markdown-it": "13.0.7", diff --git a/rewards-configuration.default.yml b/rewards-configuration.default.yml index 0ab07260..e1565c63 100644 --- a/rewards-configuration.default.yml +++ b/rewards-configuration.default.yml @@ -27,39 +27,39 @@ formattingEvaluator: td: 1 hr: 0 multipliers: - - type: [ISSUE, ISSUER, TASK]: + - type: [ISSUE, ISSUER, SPECIFICATION] formattingMultiplier: 1 wordValue: 0.1 - - type: [ISSUE, ISSUER, COMMENTED]: + - type: [ISSUE, ISSUER, COMMENTED] formattingMultiplier: 1 wordValue: 0.2 - - type: [ISSUE, ASSIGNEE, COMMENTED]: + - type: [ISSUE, ASSIGNEE, COMMENTED] formattingMultiplier: 0 wordValue: 0 - - type: [ISSUE, COLLABORATOR, COMMENTED]: + - type: [ISSUE, COLLABORATOR, COMMENTED] formattingMultiplier: 1 wordValue: 0.1 - - type: [ISSUE, CONTRIBUTOR, COMMENTED]: + - type: [ISSUE, CONTRIBUTOR, COMMENTED] formattingMultiplier: 0.25 wordValue: 0.1 - - type: [REVIEW, ISSUER, SPECIFICATION]: + - type: [REVIEW, ISSUER, TASK] formattingMultiplier: 0 wordValue: 0 - - type: [REVIEW, ISSUER, COMMENTED]: + - type: [REVIEW, ISSUER, COMMENTED] formattingMultiplier: 2 wordValue: 0.2 - - type: [REVIEW, ASSIGNEE, COMMENTED]: + - type: [REVIEW, ASSIGNEE, COMMENTED] formattingMultiplier: 1 wordValue: 0.1 - - type: [REVIEW, COLLABORATOR, COMMENTED]: + - type: [REVIEW, COLLABORATOR, COMMENTED] formattingMultiplier: 1 wordValue: 0.1 - - type: [REVIEW, CONTRIBUTOR, COMMENTED]: + - type: [REVIEW, CONTRIBUTOR, COMMENTED] formattingMultiplier: 0.25 wordValue: 0.1 permitGeneration: enabled: true githubComment: enabled: true - post: false + post: true debug: true diff --git a/src/data-collection/collect-linked-pulls.ts b/src/data-collection/collect-linked-pulls.ts index 5c1ba539..80a8a931 100644 --- a/src/data-collection/collect-linked-pulls.ts +++ b/src/data-collection/collect-linked-pulls.ts @@ -1,10 +1,41 @@ import { GitHubLinkEvent, isGitHubLinkEvent } from "../github-types"; -import { IssueParams, getAllTimelineEvents } from "../start"; +import { IssueParams, getAllTimelineEvents, parseGitHubUrl } from "../start"; export async function collectLinkedMergedPulls(issue: IssueParams) { // normally we should only use this one to calculate incentives, because this specifies that the pull requests are merged (accepted) + // and that are also related to the current issue, no just mentioned by const onlyPullRequests = await collectLinkedPulls(issue); - return onlyPullRequests.filter((event) => isGitHubLinkEvent(event) && event.source.issue.pull_request?.merged_at); + return onlyPullRequests.filter((event) => { + if (!event.source.issue.body) { + return false; + } + // Matches all keywords according to the docs: + // https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword + // Works on multiple linked issues, and matches # or URL patterns + const linkedIssueRegex = + /\b(?:Close(?:s|d)?|Fix(?:es|ed)?|Resolve(?:s|d)?):?\s+(?:#(\d+)|https?:\/\/(?:www\.)?github\.com\/(?:[^/\s]+\/[^/\s]+\/(?:issues|pull)\/(\d+)))\b/gi; + const linkedPrUrls = event.source.issue.body.match(linkedIssueRegex); + if (!linkedPrUrls) { + return false; + } + let isClosingPr = false; + for (const linkedPrUrl of linkedPrUrls) { + const idx = linkedPrUrl.indexOf("#"); + if (idx !== -1) { + isClosingPr = Number(linkedPrUrl.slice(idx + 1)) === issue.issue_number; + } else { + const url = linkedPrUrl.match(/https.+/)?.[0]; + if (url) { + const linkedRepo = parseGitHubUrl(url); + isClosingPr = + linkedRepo.issue_number === issue.issue_number && + linkedRepo.repo === issue.repo && + linkedRepo.owner === issue.owner; + } + } + } + return isGitHubLinkEvent(event) && event.source.issue.pull_request?.merged_at && isClosingPr; + }); } export async function collectLinkedPulls(issue: IssueParams) { // this one was created to help with tests, but probably should not be used in the main code diff --git a/src/issue-activity.ts b/src/issue-activity.ts index 156c0368..f0805d04 100644 --- a/src/issue-activity.ts +++ b/src/issue-activity.ts @@ -99,13 +99,19 @@ export class IssueActivity { } _getTypeFromComment( - comment: GitHubIssueComment | GitHubPullRequestReviewComment | GitHubIssue | GitHubPullRequest, + issueType: CommentType.ISSUE | CommentType.REVIEW, + comment: + | GitHubIssueComment + | GitHubPullRequestReviewComment + | GitHubPullRequestReviewState + | GitHubIssue + | GitHubPullRequest, self: GitHubPullRequest | GitHubIssue | null ) { let ret = 0; - ret |= "pull_request_review_id" in comment || "draft" in comment ? CommentType.REVIEW : CommentType.ISSUE; + ret |= issueType; if (comment.id === self?.id) { - ret |= ret & CommentType.ISSUE ? CommentType.TASK : CommentType.SPECIFICATION; + ret |= ret & CommentType.ISSUE ? CommentType.SPECIFICATION : CommentType.TASK; } else { ret |= CommentType.COMMENTED; } @@ -121,36 +127,43 @@ export class IssueActivity { return ret; } + _getLinkedReviewComments() { + const comments = []; + for (const linkedReview of this.linkedReviews) { + for (const value of Object.values(linkedReview)) { + if (Array.isArray(value)) { + for (const review of value) { + comments.push({ + ...review, + type: this._getTypeFromComment(CommentType.REVIEW, review, linkedReview.self), + }); + } + } else if (value) { + comments.push({ + ...value, + type: this._getTypeFromComment(CommentType.REVIEW, value, value), + }); + } + } + } + return comments; + } + get allComments() { const comments: Array< (GitHubIssueComment | GitHubPullRequestReviewComment | GitHubIssue | GitHubPullRequest) & { type: CommentType } > = this.comments.map((comment) => ({ ...comment, - type: this._getTypeFromComment(comment, this.self), + type: this._getTypeFromComment(CommentType.ISSUE, comment, this.self), })); if (this.self) { comments.push({ ...this.self, - type: this._getTypeFromComment(this.self, this.self), + type: this._getTypeFromComment(CommentType.ISSUE, this.self, this.self), }); } if (this.linkedReviews) { - for (const linkedReview of this.linkedReviews) { - if (linkedReview.self) { - comments.push({ - ...linkedReview.self, - type: this._getTypeFromComment(linkedReview.self, linkedReview.self), - }); - } - if (linkedReview.reviewComments) { - for (const reviewComment of linkedReview.reviewComments) { - comments.push({ - ...reviewComment, - type: this._getTypeFromComment(reviewComment, linkedReview.self), - }); - } - } - } + comments.push(...this._getLinkedReviewComments()); } return comments; } @@ -160,14 +173,21 @@ export class Review { self: GitHubPullRequest | null = null; reviews: GitHubPullRequestReviewState[] | null = null; // this includes every comment on the files view. reviewComments: GitHubPullRequestReviewComment[] | null = null; + comments: GitHubIssueComment[] | null = null; constructor(private _pullParams: PullParams) {} async init() { - [this.self, this.reviews, this.reviewComments] = await Promise.all([ + [this.self, this.reviews, this.reviewComments, this.comments] = await Promise.all([ getPullRequest(this._pullParams), getPullRequestReviews(this._pullParams), getPullRequestReviewComments(this._pullParams), + // This fetches all the comments inside the Pull Request that were not created in a reviewing context + getIssueComments({ + owner: this._pullParams.owner, + repo: this._pullParams.repo, + issue_number: this._pullParams.pull_number, + }), ]); } } diff --git a/src/parser/command-line.ts b/src/parser/command-line.ts index 2f29561b..ee7cca9d 100644 --- a/src/parser/command-line.ts +++ b/src/parser/command-line.ts @@ -12,7 +12,7 @@ if (process.env.NODE_ENV === "test") { process.argv.push("-n"); process.argv.push("100"); process.argv.push("-e"); - process.argv.push("privateKey"); + process.argv.push(`${process.env.EVM_PRIVATE_ENCRYPTED}`); } const program = new Command() diff --git a/src/parser/data-purge-module.ts b/src/parser/data-purge-module.ts index b65e8b4b..63cac788 100644 --- a/src/parser/data-purge-module.ts +++ b/src/parser/data-purge-module.ts @@ -16,10 +16,12 @@ export class DataPurgeModule implements Module { for (const comment of data.allComments) { if (comment.body && comment.user?.login && result[comment.user.login]) { const newContent = comment.body + // Remove quoted text .replace(/^>.*$/gm, "") + // Remove commands such as /start + .replace(/^\/.+/g, "") + // makes the content single lined .replace(/[\r\n]+/g, " ") - .replace(/\[.*?\]\(.*?\)/g, "") - .replace(/^\/\S+/g, "") .trim(); if (newContent.length) { result[comment.user.login].comments = [ diff --git a/src/parser/github-comment-module.ts b/src/parser/github-comment-module.ts index e7622191..a61b761b 100644 --- a/src/parser/github-comment-module.ts +++ b/src/parser/github-comment-module.ts @@ -12,7 +12,7 @@ import program from "./command-line"; import { GithubCommentScore, Module, Result } from "./processor"; interface SortedTasks { - issues: { task: GithubCommentScore | null; comments: GithubCommentScore[] }; + issues: { specification: GithubCommentScore | null; comments: GithubCommentScore[] }; reviews: GithubCommentScore[]; } @@ -60,71 +60,6 @@ export class GithubCommentModule implements Module { return true; } - _generateHtml(username: string, result: Result[0]) { - const sortedTasks = result.comments?.reduce( - (acc, curr) => { - if (curr.type & CommentType.ISSUE) { - if (curr.type & CommentType.TASK) { - acc.issues.task = curr; - } else { - acc.issues.comments.push(curr); - } - } else if (curr.type & CommentType.REVIEW) { - acc.reviews.push(curr); - } - return acc; - }, - { issues: { task: null, comments: [] }, reviews: [] } - ); - - return ` -
- - -

- - [ ${result.total} ${getPayoutConfigByNetworkId(program.opts().evmNetworkId).symbol} ] - -

-
- @${username} -
-
-
-
Contributions Overview
- - - - - - - - - - - ${this._createContributionRows(result, sortedTasks)} - -
ViewContributionCountReward
-
Conversation Incentives
- - - - - - - - - - - ${this._createIncentiveRows(sortedTasks)} - -
CommentFormattingRelevanceReward
-
- ` - .replace(/\s+/g, " ") - .trim(); - } - _createContributionRows(result: Result[0], sortedTasks: SortedTasks | undefined) { const content: string[] = []; @@ -150,8 +85,8 @@ export class GithubCommentModule implements Module { if (result.task?.reward) { content.push(buildContributionRow("Issue", "Task", 1, result.task.reward)); } - if (sortedTasks.issues.task) { - content.push(buildContributionRow("Issue", "Specification", 1, sortedTasks.issues.task.score?.reward)); + if (sortedTasks.issues.specification) { + content.push(buildContributionRow("Issue", "Specification", 1, sortedTasks.issues.specification.score?.reward)); } if (sortedTasks.issues.comments.length) { content.push( @@ -186,18 +121,25 @@ export class GithubCommentModule implements Module { function buildIncentiveRow(commentScore: GithubCommentScore) { // Properly escape carriage returns for HTML rendering const formatting = stringify(commentScore.score?.formatting?.content).replace(/[\n\r]/g, " "); + // Makes sure any HTML injected in the templated is not rendered itself + const sanitizedContent = commentScore.content.replaceAll("<", "<").replaceAll(">", ">"); return `
- ${commentScore.content.replace(/(.{64})..+/, "$1…")} + ${sanitizedContent.replace(/(.{64})..+/, "$1…")}
${Object.values(commentScore.score?.formatting?.content || {}).reduce((acc, curr) => { - return acc.add(curr.score * curr.count); + const multiplier = new Decimal( + commentScore.score?.formatting + ? commentScore.score.formatting.formattingMultiplier * commentScore.score.formatting.wordValue + : 0 + ); + return acc.add(multiplier.mul(curr.score * curr.count)); }, new Decimal(0))}
${formatting}
@@ -208,6 +150,9 @@ export class GithubCommentModule implements Module { `; } + if (sortedTasks.issues.specification) { + content.push(buildIncentiveRow(sortedTasks.issues.specification)); + } for (const issueComment of sortedTasks.issues.comments) { content.push(buildIncentiveRow(issueComment)); } @@ -216,4 +161,69 @@ export class GithubCommentModule implements Module { } return content.join(""); } + + _generateHtml(username: string, result: Result[0]) { + const sortedTasks = result.comments?.reduce( + (acc, curr) => { + if (curr.type & CommentType.ISSUE) { + if (curr.type & CommentType.SPECIFICATION) { + acc.issues.specification = curr; + } else { + acc.issues.comments.push(curr); + } + } else if (curr.type & CommentType.REVIEW) { + acc.reviews.push(curr); + } + return acc; + }, + { issues: { specification: null, comments: [] }, reviews: [] } + ); + + return ` +
+ + +

+ + [ ${result.total} ${getPayoutConfigByNetworkId(program.opts().evmNetworkId).symbol} ] + +

+
+ @${username} +
+
+
+
Contributions Overview
+ + + + + + + + + + + ${this._createContributionRows(result, sortedTasks)} + +
ViewContributionCountReward
+
Conversation Incentives
+ + + + + + + + + + + ${this._createIncentiveRows(sortedTasks)} + +
CommentFormattingRelevanceReward
+
+ ` + .replace(/[\n\r]+/g, " ") + .trim(); + } } diff --git a/src/parser/permit-generation-module.ts b/src/parser/permit-generation-module.ts index 74fd20d2..d73eba84 100644 --- a/src/parser/permit-generation-module.ts +++ b/src/parser/permit-generation-module.ts @@ -50,18 +50,14 @@ export class PermitGenerationModule implements Module { const eventName = context.eventName as SupportedEvents; const octokit = getOctokitInstance(); const logger = { - debug(message: unknown, optionalParams: unknown) { - console.log(message, optionalParams); - }, + debug() {}, error(message: unknown, optionalParams: unknown) { console.error(message, optionalParams); }, fatal(message: unknown, optionalParams: unknown) { console.error(message, optionalParams); }, - info(message: unknown, optionalParams: unknown) { - console.log(message, optionalParams); - }, + info() {}, warn(message: unknown, optionalParams: unknown) { console.warn(message, optionalParams); }, diff --git a/src/start.ts b/src/start.ts index 185f7b34..1cff40bb 100644 --- a/src/start.ts +++ b/src/start.ts @@ -120,7 +120,7 @@ export async function getAllTimelineEvents(issueParams: IssueParams): Promise { return HttpResponse.json(issueGet); }), - http.get("https://api.github.com/repos/ubiquibot/comment-incentives/issues/22/events", () => { - return HttpResponse.json(issueEventsGet); + http.get("https://api.github.com/repos/ubiquibot/comment-incentives/issues/22/events", ({ params: { page } }) => { + return HttpResponse.json(!page ? issueEventsGet : issueEvents2Get); }), http.get("https://api.github.com/repos/ubiquibot/comment-incentives/issues/22/comments", () => { return HttpResponse.json(issueCommentsGet); }), + http.get("https://api.github.com/repos/ubiquibot/comment-incentives/issues/25/comments", () => { + return HttpResponse.json(issue25CommentsGet); + }), http.get("https://api.github.com/repos/ubiquibot/comment-incentives/issues/22/timeline", () => { return HttpResponse.json(issueTimelineGet); }), @@ -32,4 +38,17 @@ export const handlers = [ http.get("https://api.github.com/repos/ubiquibot/comment-incentives/pulls/25/comments", () => { return HttpResponse.json(pullsCommentsGet); }), + http.get("https://api.github.com/users/:login", ({ params: { login } }) => { + const user = db.users.findFirst({ + where: { + login: { + equals: login.toString(), + }, + }, + }); + if (!user) { + return HttpResponse.json("User was not found", { status: 404 }); + } + return HttpResponse.json(user); + }), ]; diff --git a/tests/__mocks__/results/content-evaluator-results.json b/tests/__mocks__/results/content-evaluator-results.json new file mode 100644 index 00000000..d7847577 --- /dev/null +++ b/tests/__mocks__/results/content-evaluator-results.json @@ -0,0 +1,438 @@ +{ + "molecula451": { + "total": 1.78, + "userId": 41552663, + "comments": [ + { + "content": "pavlovcik i think we need to update a bit the readme ![image_2024-02-16_131036879](https://github.com/ubiquibot/comment-incentives/assets/41552663/41516d66-4666-47d7-9efe-517fb26293dd) dm what to whom?", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948916343", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 15, + "score": 1 + }, + "img": { + "count": 1, + "score": 0 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.3, + "relevance": 0.8 + } + }, + { + "content": "let us know when done", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948989989", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 5, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.1, + "relevance": 0.8 + } + }, + { + "content": "https://github.com/ubiquibot/comment-incentives/actions/runs/7935268560 invalid input sounds unexpected @gitcoindev ??", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949195772", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 7, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.14, + "relevance": 0.8 + } + }, + { + "content": "@pavlovcik permitted with hard debug (tho no funds in the private key)", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949564869", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 12, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.24, + "relevance": 0.8 + } + }, + { + "content": "pavlovcik i re-generated the X25519 to trigger the permit, what you don't understand? using a private key i own, but also did many commits to reach the root cause", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949635137", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 29, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.58, + "relevance": 0.8 + } + }, + { + "content": "sure thing", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949639196", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 2, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.04, + "relevance": 0.8 + } + }, + { + "content": "indeed", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949038563", + "type": "REVIEW|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 1, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.02, + "relevance": 0.8 + } + }, + { + "content": "go to go pavlovick, we'll be using this one for test only or test in production (lmao) ?", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044855", + "type": "REVIEW|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 18, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.36, + "relevance": 0.8 + } + } + ] + }, + "0x4007": { + "total": 33.44, + "userId": 4975670, + "comments": [ + { + "content": "Link below for conversation context. It was to me. Anyways you need to create a new private key for this task!", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948930217", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 21, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 3.36, + "relevance": 0.8 + } + }, + { + "content": "In the repository secrets I think I need to change the key to match @gitcoindev's", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949201722", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 15, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 2.4, + "relevance": 0.8 + } + }, + { + "content": "I just changed it to `627H-BcWbcp_O3YmQGIA6MqgxVsFuplFCA9DK3iC7GQ` I hope that it doesn't break production for some reason (it should get it from Netlify secrets, but not sure if we implemented this correctly!) I fear that we might need to build a feature for this to support development key pair and production. Unfortunately I'm already winding down for the day so I'll leave you guys to try and investigate.", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949203681", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 67, + "score": 1 + }, + "code": { + "count": 1, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 10.88, + "relevance": 0.8 + } + }, + { + "content": "I don't understand what you mean by this", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949633751", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 8, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 1.28, + "relevance": 0.8 + } + }, + { + "content": "I'll investigate more on my computer later.", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949639054", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 7, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 1.12, + "relevance": 0.8 + } + }, + { + "content": "Will it be an issue if I revert to the commit and secret that I had before? It was the production x25519 key in the GitHub repository secrets when it was working like eight hours ago. Posting this message before checking on my computer to get you before you log off.", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949642845", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 51, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 8.16, + "relevance": 0.8 + } + }, + { + "content": "Can somebody work on generating a new `X25519_PRIVATE_KEY` for the ubiquibot organization? We need to share it for development purposes. 1. Generate a new key 2. Encrypt a new `evmPrivateKeyEncrypted` (no funds!) and add to the org bot config 3. Add the shared test key to the `comment-incentives` readme. https://github.com/ubiquibot/comment-incentives/pull/21/commits/567419d9688e92edf698f64c697f1a7cafe1d02e _Originally posted by @pavlovcik in https://github.com/ubiquibot/comment-incentives/issues/19#issuecomment-1948876653_", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22", + "type": "ISSUE|ISSUER|SPECIFICATION", + "score": { + "formatting": { + "content": { + "p": { + "count": 56, + "score": 1 + }, + "code": { + "count": 3, + "score": 1 + }, + "em": { + "count": 6, + "score": 0 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 1 + }, + "reward": 4.72, + "relevance": 0.8 + } + }, + { + "content": "Need to document a private key too", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949021356", + "type": "REVIEW|COLLABORATOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 7, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 1 + }, + "reward": 0.56, + "relevance": 0.8 + } + }, + { + "content": "I was editing this right now but was too slow to push.", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949196677", + "type": "REVIEW|COLLABORATOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 12, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 1 + }, + "reward": 0.96, + "relevance": 0.8 + } + } + ] + }, + "gitcoindev": { + "total": 45.5, + "task": { + "reward": 37.5 + }, + "userId": 88761781, + "comments": [ + { + "content": "@molecula451 I tried to override X25519_PRIVATE_KEY but it did not help. It seems that https://github.com/ubiquibot/production/blob/1937a6ba75588f51d1bf07fed1f6384f79090465/.github/ubiquibot-config.yml#L2 takes precedence over https://github.com/ubiquibot/comment-incentives/blob/main/.github/ubiquibot-config.yml#L2 (I see the first one in logs).", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949333227", + "type": "ISSUE|ASSIGNEE|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 26, + "score": 1 + } + }, + "wordValue": 0, + "formattingMultiplier": 0 + }, + "reward": 0, + "relevance": 0.8 + } + }, + { + "content": "The new evmPrivateKeyEncrypted generated for address 0x3a2E44e10AbEf5CB4a6E492c5ba93d30068d2D95 (no funds). Resolves: https://github.com/ubiquibot/comment-incentives/issues/22", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25", + "type": "REVIEW|ISSUER|TASK", + "score": { + "formatting": { + "content": { + "p": { + "count": 11, + "score": 1 + } + }, + "wordValue": 0, + "formattingMultiplier": 0 + }, + "reward": 0, + "relevance": 0.8 + } + }, + { + "content": "@pavlovcik @molecula451 please check now again, I added to docs.", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044575", + "type": "REVIEW|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 10, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 2 + }, + "reward": 3.2, + "relevance": 0.8 + } + }, + { + "content": "No way, full details are available in plain sight, only for test in production purposes", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949046925", + "type": "REVIEW|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 15, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 2 + }, + "reward": 4.8, + "relevance": 0.8 + } + } + ] + } +} diff --git a/tests/__mocks__/results/data-purge-result.json b/tests/__mocks__/results/data-purge-result.json index 3eb341c9..6bd905a1 100644 --- a/tests/__mocks__/results/data-purge-result.json +++ b/tests/__mocks__/results/data-purge-result.json @@ -4,7 +4,7 @@ "userId": 41552663, "comments": [ { - "content": "pavlovcik i think we need to update a bit the readme ! dm what to whom?", + "content": "pavlovcik i think we need to update a bit the readme ![image_2024-02-16_131036879](https://github.com/ubiquibot/comment-incentives/assets/41552663/41516d66-4666-47d7-9efe-517fb26293dd) dm what to whom?", "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948916343", "type": "ISSUE|CONTRIBUTOR|COMMENTED" }, @@ -32,6 +32,16 @@ "content": "sure thing", "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949639196", "type": "ISSUE|CONTRIBUTOR|COMMENTED" + }, + { + "content": "indeed", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949038563", + "type": "REVIEW|CONTRIBUTOR|COMMENTED" + }, + { + "content": "go to go pavlovick, we'll be using this one for test only or test in production (lmao) ?", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044855", + "type": "REVIEW|CONTRIBUTOR|COMMENTED" } ] }, @@ -72,7 +82,17 @@ { "content": "Can somebody work on generating a new `X25519_PRIVATE_KEY` for the ubiquibot organization? We need to share it for development purposes. 1. Generate a new key 2. Encrypt a new `evmPrivateKeyEncrypted` (no funds!) and add to the org bot config 3. Add the shared test key to the `comment-incentives` readme. https://github.com/ubiquibot/comment-incentives/pull/21/commits/567419d9688e92edf698f64c697f1a7cafe1d02e _Originally posted by @pavlovcik in https://github.com/ubiquibot/comment-incentives/issues/19#issuecomment-1948876653_", "url": "https://github.com/ubiquibot/comment-incentives/issues/22", - "type": "ISSUE|ISSUER|TASK" + "type": "ISSUE|ISSUER|SPECIFICATION" + }, + { + "content": "Need to document a private key too", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949021356", + "type": "REVIEW|COLLABORATOR|COMMENTED" + }, + { + "content": "I was editing this right now but was too slow to push.", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949196677", + "type": "REVIEW|COLLABORATOR|COMMENTED" } ] }, @@ -91,7 +111,17 @@ { "content": "The new evmPrivateKeyEncrypted generated for address 0x3a2E44e10AbEf5CB4a6E492c5ba93d30068d2D95 (no funds). Resolves: https://github.com/ubiquibot/comment-incentives/issues/22", "url": "https://github.com/ubiquibot/comment-incentives/pull/25", - "type": "REVIEW|ISSUER|SPECIFICATION" + "type": "REVIEW|ISSUER|TASK" + }, + { + "content": "@pavlovcik @molecula451 please check now again, I added to docs.", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044575", + "type": "REVIEW|ISSUER|COMMENTED" + }, + { + "content": "No way, full details are available in plain sight, only for test in production purposes", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949046925", + "type": "REVIEW|ISSUER|COMMENTED" } ] } diff --git a/tests/__mocks__/results/formatting-evaluator-results.json b/tests/__mocks__/results/formatting-evaluator-results.json new file mode 100644 index 00000000..841a698d --- /dev/null +++ b/tests/__mocks__/results/formatting-evaluator-results.json @@ -0,0 +1,417 @@ +{ + "molecula451": { + "total": 2.225, + "userId": 41552663, + "comments": [ + { + "content": "pavlovcik i think we need to update a bit the readme ![image_2024-02-16_131036879](https://github.com/ubiquibot/comment-incentives/assets/41552663/41516d66-4666-47d7-9efe-517fb26293dd) dm what to whom?", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948916343", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 15, + "score": 1 + }, + "img": { + "count": 1, + "score": 0 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.375 + } + }, + { + "content": "let us know when done", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948989989", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 5, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.125 + } + }, + { + "content": "https://github.com/ubiquibot/comment-incentives/actions/runs/7935268560 invalid input sounds unexpected @gitcoindev ??", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949195772", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 7, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.175 + } + }, + { + "content": "@pavlovcik permitted with hard debug (tho no funds in the private key)", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949564869", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 12, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.3 + } + }, + { + "content": "pavlovcik i re-generated the X25519 to trigger the permit, what you don't understand? using a private key i own, but also did many commits to reach the root cause", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949635137", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 29, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.725 + } + }, + { + "content": "sure thing", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949639196", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 2, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.05 + } + }, + { + "content": "indeed", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949038563", + "type": "REVIEW|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 1, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.025 + } + }, + { + "content": "go to go pavlovick, we'll be using this one for test only or test in production (lmao) ?", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044855", + "type": "REVIEW|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 18, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.45 + } + } + ] + }, + "0x4007": { + "total": 41.8, + "userId": 4975670, + "comments": [ + { + "content": "Link below for conversation context. It was to me. Anyways you need to create a new private key for this task!", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948930217", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 21, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 4.2 + } + }, + { + "content": "In the repository secrets I think I need to change the key to match @gitcoindev's", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949201722", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 15, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 3 + } + }, + { + "content": "I just changed it to `627H-BcWbcp_O3YmQGIA6MqgxVsFuplFCA9DK3iC7GQ` I hope that it doesn't break production for some reason (it should get it from Netlify secrets, but not sure if we implemented this correctly!) I fear that we might need to build a feature for this to support development key pair and production. Unfortunately I'm already winding down for the day so I'll leave you guys to try and investigate.", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949203681", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 67, + "score": 1 + }, + "code": { + "count": 1, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 13.6 + } + }, + { + "content": "I don't understand what you mean by this", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949633751", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 8, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 1.6 + } + }, + { + "content": "I'll investigate more on my computer later.", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949639054", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 7, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 1.4 + } + }, + { + "content": "Will it be an issue if I revert to the commit and secret that I had before? It was the production x25519 key in the GitHub repository secrets when it was working like eight hours ago. Posting this message before checking on my computer to get you before you log off.", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949642845", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 51, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 10.2 + } + }, + { + "content": "Can somebody work on generating a new `X25519_PRIVATE_KEY` for the ubiquibot organization? We need to share it for development purposes. 1. Generate a new key 2. Encrypt a new `evmPrivateKeyEncrypted` (no funds!) and add to the org bot config 3. Add the shared test key to the `comment-incentives` readme. https://github.com/ubiquibot/comment-incentives/pull/21/commits/567419d9688e92edf698f64c697f1a7cafe1d02e _Originally posted by @pavlovcik in https://github.com/ubiquibot/comment-incentives/issues/19#issuecomment-1948876653_", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22", + "type": "ISSUE|ISSUER|SPECIFICATION", + "score": { + "formatting": { + "content": { + "p": { + "count": 56, + "score": 1 + }, + "code": { + "count": 3, + "score": 1 + }, + "em": { + "count": 6, + "score": 0 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 1 + }, + "reward": 5.9 + } + }, + { + "content": "Need to document a private key too", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949021356", + "type": "REVIEW|COLLABORATOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 7, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 1 + }, + "reward": 0.7 + } + }, + { + "content": "I was editing this right now but was too slow to push.", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949196677", + "type": "REVIEW|COLLABORATOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 12, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 1 + }, + "reward": 1.2 + } + } + ] + }, + "gitcoindev": { + "total": 47.5, + "task": { + "reward": 37.5 + }, + "userId": 88761781, + "comments": [ + { + "content": "@molecula451 I tried to override X25519_PRIVATE_KEY but it did not help. It seems that https://github.com/ubiquibot/production/blob/1937a6ba75588f51d1bf07fed1f6384f79090465/.github/ubiquibot-config.yml#L2 takes precedence over https://github.com/ubiquibot/comment-incentives/blob/main/.github/ubiquibot-config.yml#L2 (I see the first one in logs).", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949333227", + "type": "ISSUE|ASSIGNEE|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 26, + "score": 1 + } + }, + "wordValue": 0, + "formattingMultiplier": 0 + }, + "reward": 0 + } + }, + { + "content": "The new evmPrivateKeyEncrypted generated for address 0x3a2E44e10AbEf5CB4a6E492c5ba93d30068d2D95 (no funds). Resolves: https://github.com/ubiquibot/comment-incentives/issues/22", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25", + "type": "REVIEW|ISSUER|TASK", + "score": { + "formatting": { + "content": { + "p": { + "count": 11, + "score": 1 + } + }, + "wordValue": 0, + "formattingMultiplier": 0 + }, + "reward": 0 + } + }, + { + "content": "@pavlovcik @molecula451 please check now again, I added to docs.", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044575", + "type": "REVIEW|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 10, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 2 + }, + "reward": 4 + } + }, + { + "content": "No way, full details are available in plain sight, only for test in production purposes", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949046925", + "type": "REVIEW|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 15, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 2 + }, + "reward": 6 + } + } + ] + } +} diff --git a/tests/__mocks__/results/github-comment-results.json b/tests/__mocks__/results/github-comment-results.json new file mode 100644 index 00000000..bb7e8c6e --- /dev/null +++ b/tests/__mocks__/results/github-comment-results.json @@ -0,0 +1,444 @@ +{ + "molecula451": { + "total": 1.78, + "userId": 41552663, + "comments": [ + { + "content": "pavlovcik i think we need to update a bit the readme ![image_2024-02-16_131036879](https://github.com/ubiquibot/comment-incentives/assets/41552663/41516d66-4666-47d7-9efe-517fb26293dd) dm what to whom?", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948916343", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 15, + "score": 1 + }, + "img": { + "count": 1, + "score": 0 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.3, + "relevance": 0.8 + } + }, + { + "content": "let us know when done", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948989989", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 5, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.1, + "relevance": 0.8 + } + }, + { + "content": "https://github.com/ubiquibot/comment-incentives/actions/runs/7935268560 invalid input sounds unexpected @gitcoindev ??", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949195772", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 7, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.14, + "relevance": 0.8 + } + }, + { + "content": "@pavlovcik permitted with hard debug (tho no funds in the private key)", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949564869", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 12, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.24, + "relevance": 0.8 + } + }, + { + "content": "pavlovcik i re-generated the X25519 to trigger the permit, what you don't understand? using a private key i own, but also did many commits to reach the root cause", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949635137", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 29, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.58, + "relevance": 0.8 + } + }, + { + "content": "sure thing", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949639196", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 2, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.04, + "relevance": 0.8 + } + }, + { + "content": "indeed", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949038563", + "type": "REVIEW|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 1, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.02, + "relevance": 0.8 + } + }, + { + "content": "go to go pavlovick, we'll be using this one for test only or test in production (lmao) ?", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044855", + "type": "REVIEW|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 18, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.36, + "relevance": 0.8 + } + } + ], + "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiIxNzgwMDAwMDAwMDAwMDAwMDAwIn0sIm5vbmNlIjoiNTU5OTM2MDE0NzcwMzQzMTA4MTU5NDY5ODEzMzcwNTA1MDMxMzkxMzU2MjIzMDMwNTA5MjQyNzA2ODYyOTY3NzAwMDEzODA2OTM3ODEiLCJkZWFkbGluZSI6IjU3ODk2MDQ0NjE4NjU4MDk3NzExNzg1NDkyNTA0MzQzOTUzOTI2NjM0OTkyMzMyODIwMjgyMDE5NzI4NzkyMDAzOTU2NTY0ODE5OTY3In0sInRyYW5zZmVyRGV0YWlscyI6eyJ0byI6IjB4NEQwNzA0ZjQwMEQ1N0JhOTNlRWE4ODc2NUMzRmNEQkQ4MjZkQ0ZjNCIsInJlcXVlc3RlZEFtb3VudCI6IjE3ODAwMDAwMDAwMDAwMDAwMDAifSwib3duZXIiOiIweDBmQzFiOTA5YmE5MjY1QTg0NmI4MkNGNENFMzUyZmMzZTdFZUIyRUQiLCJzaWduYXR1cmUiOiIweDQyZWI1ZjQ3Y2QzNTlhYWE3MWQ4MGJiZWExNjFkOTAyY2JmODhkMTg4N2M0ZmQ4YTdlMTUwMWVmNWY2NTc3YzY1MmQ1MmYwMGFhYzYyYWE4MDk0MTViYmFiYTZkZWM4MmY5OTMxMTNjY2ZjZTlkOWI4MDgwM2ZmNGExMWYzMzEzMWMiLCJuZXR3b3JrSWQiOjEwMH1d", + "evaluationCommentHtml": "

[ 1.78 WXDAI ]

@molecula451
Contributions Overview
View Contribution Count Reward
Issue Comment 6 1.4
Review Comment 2 0.38
Conversation Incentives
Comment Formatting Relevance Reward
pavlovcik i think we need to update a bit the readme ![image_202…
0.375
p:
  count: 15
  score: 1
img:
  count: 1
  score: 0
0.8 0.3
let us know when done
0.125
p:
  count: 5
  score: 1
0.8 0.1
https://github.com/ubiquibot/comment-incentives/actions/runs/793…
0.175
p:
  count: 7
  score: 1
0.8 0.14
@pavlovcik permitted with hard debug (tho no funds in the privat…
0.3
p:
  count: 12
  score: 1
0.8 0.24
pavlovcik i re-generated the X25519 to trigger the permit, what …
0.725
p:
  count: 29
  score: 1
0.8 0.58
sure thing
0.05
p:
  count: 2
  score: 1
0.8 0.04
indeed
0.025
p:
  count: 1
  score: 1
0.8 0.02
go to go pavlovick, we'll be using this one for test only or tes…
0.45
p:
  count: 18
  score: 1
0.8 0.36
" + }, + "0x4007": { + "total": 33.44, + "userId": 4975670, + "comments": [ + { + "content": "Link below for conversation context. It was to me. Anyways you need to create a new private key for this task!", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948930217", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 21, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 3.36, + "relevance": 0.8 + } + }, + { + "content": "In the repository secrets I think I need to change the key to match @gitcoindev's", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949201722", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 15, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 2.4, + "relevance": 0.8 + } + }, + { + "content": "I just changed it to `627H-BcWbcp_O3YmQGIA6MqgxVsFuplFCA9DK3iC7GQ` I hope that it doesn't break production for some reason (it should get it from Netlify secrets, but not sure if we implemented this correctly!) I fear that we might need to build a feature for this to support development key pair and production. Unfortunately I'm already winding down for the day so I'll leave you guys to try and investigate.", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949203681", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 67, + "score": 1 + }, + "code": { + "count": 1, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 10.88, + "relevance": 0.8 + } + }, + { + "content": "I don't understand what you mean by this", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949633751", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 8, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 1.28, + "relevance": 0.8 + } + }, + { + "content": "I'll investigate more on my computer later.", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949639054", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 7, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 1.12, + "relevance": 0.8 + } + }, + { + "content": "Will it be an issue if I revert to the commit and secret that I had before? It was the production x25519 key in the GitHub repository secrets when it was working like eight hours ago. Posting this message before checking on my computer to get you before you log off.", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949642845", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 51, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 8.16, + "relevance": 0.8 + } + }, + { + "content": "Can somebody work on generating a new `X25519_PRIVATE_KEY` for the ubiquibot organization? We need to share it for development purposes. 1. Generate a new key 2. Encrypt a new `evmPrivateKeyEncrypted` (no funds!) and add to the org bot config 3. Add the shared test key to the `comment-incentives` readme. https://github.com/ubiquibot/comment-incentives/pull/21/commits/567419d9688e92edf698f64c697f1a7cafe1d02e _Originally posted by @pavlovcik in https://github.com/ubiquibot/comment-incentives/issues/19#issuecomment-1948876653_", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22", + "type": "ISSUE|ISSUER|SPECIFICATION", + "score": { + "formatting": { + "content": { + "p": { + "count": 56, + "score": 1 + }, + "code": { + "count": 3, + "score": 1 + }, + "em": { + "count": 6, + "score": 0 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 1 + }, + "reward": 4.72, + "relevance": 0.8 + } + }, + { + "content": "Need to document a private key too", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949021356", + "type": "REVIEW|COLLABORATOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 7, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 1 + }, + "reward": 0.56, + "relevance": 0.8 + } + }, + { + "content": "I was editing this right now but was too slow to push.", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949196677", + "type": "REVIEW|COLLABORATOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 12, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 1 + }, + "reward": 0.96, + "relevance": 0.8 + } + } + ], + "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiIzMzQ0MDAwMDAwMDAwMDAwMDAwMCJ9LCJub25jZSI6IjU0MTU2NjczMjEwMTg2MDc2NjY3MDM0MzA4MDMwMzQxMTU2NjMyMTc1NDA0MTE1ODg4NzA3NjM5NTc1ODU0Mzg0MzM3NTUwNzUyMjU2IiwiZGVhZGxpbmUiOiI1Nzg5NjA0NDYxODY1ODA5NzcxMTc4NTQ5MjUwNDM0Mzk1MzkyNjYzNDk5MjMzMjgyMDI4MjAxOTcyODc5MjAwMzk1NjU2NDgxOTk2NyJ9LCJ0cmFuc2ZlckRldGFpbHMiOnsidG8iOiIweDREMDcwNGY0MDBENTdCYTkzZUVhODg3NjVDM0ZjREJEODI2ZENGYzQiLCJyZXF1ZXN0ZWRBbW91bnQiOiIzMzQ0MDAwMDAwMDAwMDAwMDAwMCJ9LCJvd25lciI6IjB4MGZDMWI5MDliYTkyNjVBODQ2YjgyQ0Y0Q0UzNTJmYzNlN0VlQjJFRCIsInNpZ25hdHVyZSI6IjB4YWUyOWQwNWE1N2EwNDg0NzE5MDc4ZDQ4MWUxMWVmMDBlY2RiYzIwMjczOGJiY2QzZjc5NDFiYjkzNTY2ZDE4ZDUwZTBkY2NjNjkxM2U5OTM2MjJmNTVjZmM4NWNkNmY5YTNhOTYzZWNhNmRhZGY4NzVlYjIxOTg4NmM1MGY4ZTUxYiIsIm5ldHdvcmtJZCI6MTAwfV0=", + "evaluationCommentHtml": "

[ 33.44 WXDAI ]

@0x4007
Contributions Overview
View Contribution Count Reward
Issue Specification 1 4.72
Issue Comment 6 27.2
Review Comment 2 1.52
Conversation Incentives
Comment Formatting Relevance Reward
Can somebody work on generating a new `X25519_PRIVATE_KEY` for t…
5.9
p:
  count: 56
  score: 1
code:
  count: 3
  score: 1
em:
  count: 6
  score: 0
0.8 4.72
Link below for conversation context. It was to me. Anyways you n…
4.2
p:
  count: 21
  score: 1
0.8 3.36
In the repository secrets I think I need to change the key to ma…
3
p:
  count: 15
  score: 1
0.8 2.4
I just changed it to `627H-BcWbcp_O3YmQGIA6MqgxVsFuplFCA9DK3iC7G…
13.6
p:
  count: 67
  score: 1
code:
  count: 1
  score: 1
0.8 10.88
I don't understand what you mean by this
1.6
p:
  count: 8
  score: 1
0.8 1.28
I'll investigate more on my computer later.
1.4
p:
  count: 7
  score: 1
0.8 1.12
Will it be an issue if I revert to the commit and secret that I …
10.2
p:
  count: 51
  score: 1
0.8 8.16
Need to document a private key too
0.7
p:
  count: 7
  score: 1
0.8 0.56
I was editing this right now but was too slow to push.
1.2
p:
  count: 12
  score: 1
0.8 0.96
" + }, + "gitcoindev": { + "total": 45.5, + "task": { + "reward": 37.5 + }, + "userId": 88761781, + "comments": [ + { + "content": "@molecula451 I tried to override X25519_PRIVATE_KEY but it did not help. It seems that https://github.com/ubiquibot/production/blob/1937a6ba75588f51d1bf07fed1f6384f79090465/.github/ubiquibot-config.yml#L2 takes precedence over https://github.com/ubiquibot/comment-incentives/blob/main/.github/ubiquibot-config.yml#L2 (I see the first one in logs).", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949333227", + "type": "ISSUE|ASSIGNEE|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 26, + "score": 1 + } + }, + "wordValue": 0, + "formattingMultiplier": 0 + }, + "reward": 0, + "relevance": 0.8 + } + }, + { + "content": "The new evmPrivateKeyEncrypted generated for address 0x3a2E44e10AbEf5CB4a6E492c5ba93d30068d2D95 (no funds). Resolves: https://github.com/ubiquibot/comment-incentives/issues/22", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25", + "type": "REVIEW|ISSUER|TASK", + "score": { + "formatting": { + "content": { + "p": { + "count": 11, + "score": 1 + } + }, + "wordValue": 0, + "formattingMultiplier": 0 + }, + "reward": 0, + "relevance": 0.8 + } + }, + { + "content": "@pavlovcik @molecula451 please check now again, I added to docs.", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044575", + "type": "REVIEW|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 10, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 2 + }, + "reward": 3.2, + "relevance": 0.8 + } + }, + { + "content": "No way, full details are available in plain sight, only for test in production purposes", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949046925", + "type": "REVIEW|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 15, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 2 + }, + "reward": 4.8, + "relevance": 0.8 + } + } + ], + "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiI0NTUwMDAwMDAwMDAwMDAwMDAwMCJ9LCJub25jZSI6IjI1NTAxODE5OTY2NjA1NzQ1MzA1NTE0MTk4MDg3NTY5MTYyMTg1ODQzNzc2NTY0MDgxNzUwODI4NjE5MzMxNjYyNDIzMjAwMTU3MDk1IiwiZGVhZGxpbmUiOiI1Nzg5NjA0NDYxODY1ODA5NzcxMTc4NTQ5MjUwNDM0Mzk1MzkyNjYzNDk5MjMzMjgyMDI4MjAxOTcyODc5MjAwMzk1NjU2NDgxOTk2NyJ9LCJ0cmFuc2ZlckRldGFpbHMiOnsidG8iOiIweDREMDcwNGY0MDBENTdCYTkzZUVhODg3NjVDM0ZjREJEODI2ZENGYzQiLCJyZXF1ZXN0ZWRBbW91bnQiOiI0NTUwMDAwMDAwMDAwMDAwMDAwMCJ9LCJvd25lciI6IjB4MGZDMWI5MDliYTkyNjVBODQ2YjgyQ0Y0Q0UzNTJmYzNlN0VlQjJFRCIsInNpZ25hdHVyZSI6IjB4NzQzNWUxMTZlN2FjYTg4OTI0YmI3ODVmZmQ0ZWM4ZjYzNGI4YWNkYmM1NGQ5OTBjOTU5N2VkNzVmYTA0MTE5NDcwZjc2ZGRhMTAzMzVmMGUyMjVmM2Q0YTVkMWEzNDQyYWMxZjkzYTIwMjNlYjY4N2VlZmI3NzIzMGY5MTQzZmYxYiIsIm5ldHdvcmtJZCI6MTAwfV0=", + "evaluationCommentHtml": "

[ 45.5 WXDAI ]

@gitcoindev
Contributions Overview
View Contribution Count Reward
Issue Task 1 37.5
Issue Comment 1 0
Review Comment 3 8
Conversation Incentives
Comment Formatting Relevance Reward
@molecula451 I tried to override X25519_PRIVATE_KEY but it did n…
0
p:
  count: 26
  score: 1
0.8 -
The new evmPrivateKeyEncrypted generated for address 0x3a2E44e10…
0
p:
  count: 11
  score: 1
0.8 -
@pavlovcik @molecula451 please check now again, I added to docs.
4
p:
  count: 10
  score: 1
0.8 3.2
No way, full details are available in plain sight, only for test…
6
p:
  count: 15
  score: 1
0.8 4.8
" + } +} diff --git a/tests/__mocks__/results/output.html b/tests/__mocks__/results/output.html new file mode 100644 index 00000000..803ecfdd --- /dev/null +++ b/tests/__mocks__/results/output.html @@ -0,0 +1 @@ +

[ 1.78 WXDAI ]

@molecula451
Contributions Overview
View Contribution Count Reward
Issue Comment 6 1.4
Review Comment 2 0.38
Conversation Incentives
Comment Formatting Relevance Reward
pavlovcik i think we need to update a bit the readme ![image_202…
0.375
p:
  count: 15
  score: 1
img:
  count: 1
  score: 0
0.8 0.3
let us know when done
0.125
p:
  count: 5
  score: 1
0.8 0.1
https://github.com/ubiquibot/comment-incentives/actions/runs/793…
0.175
p:
  count: 7
  score: 1
0.8 0.14
@pavlovcik permitted with hard debug (tho no funds in the privat…
0.3
p:
  count: 12
  score: 1
0.8 0.24
pavlovcik i re-generated the X25519 to trigger the permit, what …
0.725
p:
  count: 29
  score: 1
0.8 0.58
sure thing
0.05
p:
  count: 2
  score: 1
0.8 0.04
indeed
0.025
p:
  count: 1
  score: 1
0.8 0.02
go to go pavlovick, we'll be using this one for test only or tes…
0.45
p:
  count: 18
  score: 1
0.8 0.36

[ 33.44 WXDAI ]

@0x4007
Contributions Overview
View Contribution Count Reward
Issue Specification 1 4.72
Issue Comment 6 27.2
Review Comment 2 1.52
Conversation Incentives
Comment Formatting Relevance Reward
Can somebody work on generating a new `X25519_PRIVATE_KEY` for t…
5.9
p:
  count: 56
  score: 1
code:
  count: 3
  score: 1
em:
  count: 6
  score: 0
0.8 4.72
Link below for conversation context. It was to me. Anyways you n…
4.2
p:
  count: 21
  score: 1
0.8 3.36
In the repository secrets I think I need to change the key to ma…
3
p:
  count: 15
  score: 1
0.8 2.4
I just changed it to `627H-BcWbcp_O3YmQGIA6MqgxVsFuplFCA9DK3iC7G…
13.6
p:
  count: 67
  score: 1
code:
  count: 1
  score: 1
0.8 10.88
I don't understand what you mean by this
1.6
p:
  count: 8
  score: 1
0.8 1.28
I'll investigate more on my computer later.
1.4
p:
  count: 7
  score: 1
0.8 1.12
Will it be an issue if I revert to the commit and secret that I …
10.2
p:
  count: 51
  score: 1
0.8 8.16
Need to document a private key too
0.7
p:
  count: 7
  score: 1
0.8 0.56
I was editing this right now but was too slow to push.
1.2
p:
  count: 12
  score: 1
0.8 0.96

[ 45.5 WXDAI ]

@gitcoindev
Contributions Overview
View Contribution Count Reward
Issue Task 1 37.5
Issue Comment 1 0
Review Comment 3 8
Conversation Incentives
Comment Formatting Relevance Reward
@molecula451 I tried to override X25519_PRIVATE_KEY but it did n…
0
p:
  count: 26
  score: 1
0.8 -
The new evmPrivateKeyEncrypted generated for address 0x3a2E44e10…
0
p:
  count: 11
  score: 1
0.8 -
@pavlovcik @molecula451 please check now again, I added to docs.
4
p:
  count: 10
  score: 1
0.8 3.2
No way, full details are available in plain sight, only for test…
6
p:
  count: 15
  score: 1
0.8 4.8
\ No newline at end of file diff --git a/tests/__mocks__/results/permit-generation-results.json b/tests/__mocks__/results/permit-generation-results.json new file mode 100644 index 00000000..869e9fc1 --- /dev/null +++ b/tests/__mocks__/results/permit-generation-results.json @@ -0,0 +1,441 @@ +{ + "molecula451": { + "total": 1.78, + "userId": 41552663, + "comments": [ + { + "content": "pavlovcik i think we need to update a bit the readme ![image_2024-02-16_131036879](https://github.com/ubiquibot/comment-incentives/assets/41552663/41516d66-4666-47d7-9efe-517fb26293dd) dm what to whom?", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948916343", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 15, + "score": 1 + }, + "img": { + "count": 1, + "score": 0 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.3, + "relevance": 0.8 + } + }, + { + "content": "let us know when done", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948989989", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 5, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.1, + "relevance": 0.8 + } + }, + { + "content": "https://github.com/ubiquibot/comment-incentives/actions/runs/7935268560 invalid input sounds unexpected @gitcoindev ??", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949195772", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 7, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.14, + "relevance": 0.8 + } + }, + { + "content": "@pavlovcik permitted with hard debug (tho no funds in the private key)", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949564869", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 12, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.24, + "relevance": 0.8 + } + }, + { + "content": "pavlovcik i re-generated the X25519 to trigger the permit, what you don't understand? using a private key i own, but also did many commits to reach the root cause", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949635137", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 29, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.58, + "relevance": 0.8 + } + }, + { + "content": "sure thing", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949639196", + "type": "ISSUE|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 2, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.04, + "relevance": 0.8 + } + }, + { + "content": "indeed", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949038563", + "type": "REVIEW|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 1, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.02, + "relevance": 0.8 + } + }, + { + "content": "go to go pavlovick, we'll be using this one for test only or test in production (lmao) ?", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044855", + "type": "REVIEW|CONTRIBUTOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 18, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 0.25 + }, + "reward": 0.36, + "relevance": 0.8 + } + } + ], + "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiIxNzgwMDAwMDAwMDAwMDAwMDAwIn0sIm5vbmNlIjoiNTU5OTM2MDE0NzcwMzQzMTA4MTU5NDY5ODEzMzcwNTA1MDMxMzkxMzU2MjIzMDMwNTA5MjQyNzA2ODYyOTY3NzAwMDEzODA2OTM3ODEiLCJkZWFkbGluZSI6IjU3ODk2MDQ0NjE4NjU4MDk3NzExNzg1NDkyNTA0MzQzOTUzOTI2NjM0OTkyMzMyODIwMjgyMDE5NzI4NzkyMDAzOTU2NTY0ODE5OTY3In0sInRyYW5zZmVyRGV0YWlscyI6eyJ0byI6IjB4NEQwNzA0ZjQwMEQ1N0JhOTNlRWE4ODc2NUMzRmNEQkQ4MjZkQ0ZjNCIsInJlcXVlc3RlZEFtb3VudCI6IjE3ODAwMDAwMDAwMDAwMDAwMDAifSwib3duZXIiOiIweDBmQzFiOTA5YmE5MjY1QTg0NmI4MkNGNENFMzUyZmMzZTdFZUIyRUQiLCJzaWduYXR1cmUiOiIweDQyZWI1ZjQ3Y2QzNTlhYWE3MWQ4MGJiZWExNjFkOTAyY2JmODhkMTg4N2M0ZmQ4YTdlMTUwMWVmNWY2NTc3YzY1MmQ1MmYwMGFhYzYyYWE4MDk0MTViYmFiYTZkZWM4MmY5OTMxMTNjY2ZjZTlkOWI4MDgwM2ZmNGExMWYzMzEzMWMiLCJuZXR3b3JrSWQiOjEwMH1d" + }, + "0x4007": { + "total": 33.44, + "userId": 4975670, + "comments": [ + { + "content": "Link below for conversation context. It was to me. Anyways you need to create a new private key for this task!", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948930217", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 21, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 3.36, + "relevance": 0.8 + } + }, + { + "content": "In the repository secrets I think I need to change the key to match @gitcoindev's", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949201722", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 15, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 2.4, + "relevance": 0.8 + } + }, + { + "content": "I just changed it to `627H-BcWbcp_O3YmQGIA6MqgxVsFuplFCA9DK3iC7GQ` I hope that it doesn't break production for some reason (it should get it from Netlify secrets, but not sure if we implemented this correctly!) I fear that we might need to build a feature for this to support development key pair and production. Unfortunately I'm already winding down for the day so I'll leave you guys to try and investigate.", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949203681", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 67, + "score": 1 + }, + "code": { + "count": 1, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 10.88, + "relevance": 0.8 + } + }, + { + "content": "I don't understand what you mean by this", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949633751", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 8, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 1.28, + "relevance": 0.8 + } + }, + { + "content": "I'll investigate more on my computer later.", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949639054", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 7, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 1.12, + "relevance": 0.8 + } + }, + { + "content": "Will it be an issue if I revert to the commit and secret that I had before? It was the production x25519 key in the GitHub repository secrets when it was working like eight hours ago. Posting this message before checking on my computer to get you before you log off.", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949642845", + "type": "ISSUE|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 51, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 1 + }, + "reward": 8.16, + "relevance": 0.8 + } + }, + { + "content": "Can somebody work on generating a new `X25519_PRIVATE_KEY` for the ubiquibot organization? We need to share it for development purposes. 1. Generate a new key 2. Encrypt a new `evmPrivateKeyEncrypted` (no funds!) and add to the org bot config 3. Add the shared test key to the `comment-incentives` readme. https://github.com/ubiquibot/comment-incentives/pull/21/commits/567419d9688e92edf698f64c697f1a7cafe1d02e _Originally posted by @pavlovcik in https://github.com/ubiquibot/comment-incentives/issues/19#issuecomment-1948876653_", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22", + "type": "ISSUE|ISSUER|SPECIFICATION", + "score": { + "formatting": { + "content": { + "p": { + "count": 56, + "score": 1 + }, + "code": { + "count": 3, + "score": 1 + }, + "em": { + "count": 6, + "score": 0 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 1 + }, + "reward": 4.72, + "relevance": 0.8 + } + }, + { + "content": "Need to document a private key too", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949021356", + "type": "REVIEW|COLLABORATOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 7, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 1 + }, + "reward": 0.56, + "relevance": 0.8 + } + }, + { + "content": "I was editing this right now but was too slow to push.", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949196677", + "type": "REVIEW|COLLABORATOR|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 12, + "score": 1 + } + }, + "wordValue": 0.1, + "formattingMultiplier": 1 + }, + "reward": 0.96, + "relevance": 0.8 + } + } + ], + "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiIzMzQ0MDAwMDAwMDAwMDAwMDAwMCJ9LCJub25jZSI6IjU0MTU2NjczMjEwMTg2MDc2NjY3MDM0MzA4MDMwMzQxMTU2NjMyMTc1NDA0MTE1ODg4NzA3NjM5NTc1ODU0Mzg0MzM3NTUwNzUyMjU2IiwiZGVhZGxpbmUiOiI1Nzg5NjA0NDYxODY1ODA5NzcxMTc4NTQ5MjUwNDM0Mzk1MzkyNjYzNDk5MjMzMjgyMDI4MjAxOTcyODc5MjAwMzk1NjU2NDgxOTk2NyJ9LCJ0cmFuc2ZlckRldGFpbHMiOnsidG8iOiIweDREMDcwNGY0MDBENTdCYTkzZUVhODg3NjVDM0ZjREJEODI2ZENGYzQiLCJyZXF1ZXN0ZWRBbW91bnQiOiIzMzQ0MDAwMDAwMDAwMDAwMDAwMCJ9LCJvd25lciI6IjB4MGZDMWI5MDliYTkyNjVBODQ2YjgyQ0Y0Q0UzNTJmYzNlN0VlQjJFRCIsInNpZ25hdHVyZSI6IjB4YWUyOWQwNWE1N2EwNDg0NzE5MDc4ZDQ4MWUxMWVmMDBlY2RiYzIwMjczOGJiY2QzZjc5NDFiYjkzNTY2ZDE4ZDUwZTBkY2NjNjkxM2U5OTM2MjJmNTVjZmM4NWNkNmY5YTNhOTYzZWNhNmRhZGY4NzVlYjIxOTg4NmM1MGY4ZTUxYiIsIm5ldHdvcmtJZCI6MTAwfV0=" + }, + "gitcoindev": { + "total": 45.5, + "task": { + "reward": 37.5 + }, + "userId": 88761781, + "comments": [ + { + "content": "@molecula451 I tried to override X25519_PRIVATE_KEY but it did not help. It seems that https://github.com/ubiquibot/production/blob/1937a6ba75588f51d1bf07fed1f6384f79090465/.github/ubiquibot-config.yml#L2 takes precedence over https://github.com/ubiquibot/comment-incentives/blob/main/.github/ubiquibot-config.yml#L2 (I see the first one in logs).", + "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949333227", + "type": "ISSUE|ASSIGNEE|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 26, + "score": 1 + } + }, + "wordValue": 0, + "formattingMultiplier": 0 + }, + "reward": 0, + "relevance": 0.8 + } + }, + { + "content": "The new evmPrivateKeyEncrypted generated for address 0x3a2E44e10AbEf5CB4a6E492c5ba93d30068d2D95 (no funds). Resolves: https://github.com/ubiquibot/comment-incentives/issues/22", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25", + "type": "REVIEW|ISSUER|TASK", + "score": { + "formatting": { + "content": { + "p": { + "count": 11, + "score": 1 + } + }, + "wordValue": 0, + "formattingMultiplier": 0 + }, + "reward": 0, + "relevance": 0.8 + } + }, + { + "content": "@pavlovcik @molecula451 please check now again, I added to docs.", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044575", + "type": "REVIEW|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 10, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 2 + }, + "reward": 3.2, + "relevance": 0.8 + } + }, + { + "content": "No way, full details are available in plain sight, only for test in production purposes", + "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949046925", + "type": "REVIEW|ISSUER|COMMENTED", + "score": { + "formatting": { + "content": { + "p": { + "count": 15, + "score": 1 + } + }, + "wordValue": 0.2, + "formattingMultiplier": 2 + }, + "reward": 4.8, + "relevance": 0.8 + } + } + ], + "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiI0NTUwMDAwMDAwMDAwMDAwMDAwMCJ9LCJub25jZSI6IjI1NTAxODE5OTY2NjA1NzQ1MzA1NTE0MTk4MDg3NTY5MTYyMTg1ODQzNzc2NTY0MDgxNzUwODI4NjE5MzMxNjYyNDIzMjAwMTU3MDk1IiwiZGVhZGxpbmUiOiI1Nzg5NjA0NDYxODY1ODA5NzcxMTc4NTQ5MjUwNDM0Mzk1MzkyNjYzNDk5MjMzMjgyMDI4MjAxOTcyODc5MjAwMzk1NjU2NDgxOTk2NyJ9LCJ0cmFuc2ZlckRldGFpbHMiOnsidG8iOiIweDREMDcwNGY0MDBENTdCYTkzZUVhODg3NjVDM0ZjREJEODI2ZENGYzQiLCJyZXF1ZXN0ZWRBbW91bnQiOiI0NTUwMDAwMDAwMDAwMDAwMDAwMCJ9LCJvd25lciI6IjB4MGZDMWI5MDliYTkyNjVBODQ2YjgyQ0Y0Q0UzNTJmYzNlN0VlQjJFRCIsInNpZ25hdHVyZSI6IjB4NzQzNWUxMTZlN2FjYTg4OTI0YmI3ODVmZmQ0ZWM4ZjYzNGI4YWNkYmM1NGQ5OTBjOTU5N2VkNzVmYTA0MTE5NDcwZjc2ZGRhMTAzMzVmMGUyMjVmM2Q0YTVkMWEzNDQyYWMxZjkzYTIwMjNlYjY4N2VlZmI3NzIzMGY5MTQzZmYxYiIsIm5ldHdvcmtJZCI6MTAwfV0=" + } +} diff --git a/tests/__mocks__/routes/issue-25-comments-get.json b/tests/__mocks__/routes/issue-25-comments-get.json new file mode 100644 index 00000000..b76e848d --- /dev/null +++ b/tests/__mocks__/routes/issue-25-comments-get.json @@ -0,0 +1,266 @@ +[ + { + "url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/comments/1949021356", + "html_url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949021356", + "issue_url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/25", + "id": 1949021356, + "node_id": "IC_kwDOK87YcM50K7Ss", + "user": { + "login": "0x4007", + "id": 4975670, + "node_id": "MDQ6VXNlcjQ5NzU2NzA=", + "avatar_url": "https://avatars.githubusercontent.com/u/4975670?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/0x4007", + "html_url": "https://github.com/0x4007", + "followers_url": "https://api.github.com/users/0x4007/followers", + "following_url": "https://api.github.com/users/0x4007/following{/other_user}", + "gists_url": "https://api.github.com/users/0x4007/gists{/gist_id}", + "starred_url": "https://api.github.com/users/0x4007/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/0x4007/subscriptions", + "organizations_url": "https://api.github.com/users/0x4007/orgs", + "repos_url": "https://api.github.com/users/0x4007/repos", + "events_url": "https://api.github.com/users/0x4007/events{/privacy}", + "received_events_url": "https://api.github.com/users/0x4007/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2024-02-16T18:11:04Z", + "updated_at": "2024-02-16T18:11:04Z", + "author_association": "MEMBER", + "body": "Need to document a private key too ", + "reactions": { + "url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/comments/1949021356/reactions", + "total_count": 2, + "+1": 2, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + }, + { + "url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/comments/1949038563", + "html_url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949038563", + "issue_url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/25", + "id": 1949038563, + "node_id": "IC_kwDOK87YcM50K_fj", + "user": { + "login": "molecula451", + "id": 41552663, + "node_id": "MDQ6VXNlcjQxNTUyNjYz", + "avatar_url": "https://avatars.githubusercontent.com/u/41552663?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/molecula451", + "html_url": "https://github.com/molecula451", + "followers_url": "https://api.github.com/users/molecula451/followers", + "following_url": "https://api.github.com/users/molecula451/following{/other_user}", + "gists_url": "https://api.github.com/users/molecula451/gists{/gist_id}", + "starred_url": "https://api.github.com/users/molecula451/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/molecula451/subscriptions", + "organizations_url": "https://api.github.com/users/molecula451/orgs", + "repos_url": "https://api.github.com/users/molecula451/repos", + "events_url": "https://api.github.com/users/molecula451/events{/privacy}", + "received_events_url": "https://api.github.com/users/molecula451/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2024-02-16T18:17:06Z", + "updated_at": "2024-02-16T18:17:06Z", + "author_association": "CONTRIBUTOR", + "body": "indeed", + "reactions": { + "url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/comments/1949038563/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + }, + { + "url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/comments/1949044575", + "html_url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044575", + "issue_url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/25", + "id": 1949044575, + "node_id": "IC_kwDOK87YcM50LA9f", + "user": { + "login": "gitcoindev", + "id": 88761781, + "node_id": "MDQ6VXNlcjg4NzYxNzgx", + "avatar_url": "https://avatars.githubusercontent.com/u/88761781?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/gitcoindev", + "html_url": "https://github.com/gitcoindev", + "followers_url": "https://api.github.com/users/gitcoindev/followers", + "following_url": "https://api.github.com/users/gitcoindev/following{/other_user}", + "gists_url": "https://api.github.com/users/gitcoindev/gists{/gist_id}", + "starred_url": "https://api.github.com/users/gitcoindev/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitcoindev/subscriptions", + "organizations_url": "https://api.github.com/users/gitcoindev/orgs", + "repos_url": "https://api.github.com/users/gitcoindev/repos", + "events_url": "https://api.github.com/users/gitcoindev/events{/privacy}", + "received_events_url": "https://api.github.com/users/gitcoindev/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2024-02-16T18:19:03Z", + "updated_at": "2024-02-16T18:19:03Z", + "author_association": "CONTRIBUTOR", + "body": "@pavlovcik @molecula451 please check now again, I added to docs.", + "reactions": { + "url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/comments/1949044575/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + }, + { + "url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/comments/1949044855", + "html_url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044855", + "issue_url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/25", + "id": 1949044855, + "node_id": "IC_kwDOK87YcM50LBB3", + "user": { + "login": "molecula451", + "id": 41552663, + "node_id": "MDQ6VXNlcjQxNTUyNjYz", + "avatar_url": "https://avatars.githubusercontent.com/u/41552663?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/molecula451", + "html_url": "https://github.com/molecula451", + "followers_url": "https://api.github.com/users/molecula451/followers", + "following_url": "https://api.github.com/users/molecula451/following{/other_user}", + "gists_url": "https://api.github.com/users/molecula451/gists{/gist_id}", + "starred_url": "https://api.github.com/users/molecula451/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/molecula451/subscriptions", + "organizations_url": "https://api.github.com/users/molecula451/orgs", + "repos_url": "https://api.github.com/users/molecula451/repos", + "events_url": "https://api.github.com/users/molecula451/events{/privacy}", + "received_events_url": "https://api.github.com/users/molecula451/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2024-02-16T18:19:09Z", + "updated_at": "2024-02-16T18:19:09Z", + "author_association": "CONTRIBUTOR", + "body": "go to go pavlovick, we'll be using this one for test only or test in production (lmao) ?", + "reactions": { + "url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/comments/1949044855/reactions", + "total_count": 1, + "+1": 0, + "-1": 0, + "laugh": 1, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + }, + { + "url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/comments/1949046925", + "html_url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949046925", + "issue_url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/25", + "id": 1949046925, + "node_id": "IC_kwDOK87YcM50LBiN", + "user": { + "login": "gitcoindev", + "id": 88761781, + "node_id": "MDQ6VXNlcjg4NzYxNzgx", + "avatar_url": "https://avatars.githubusercontent.com/u/88761781?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/gitcoindev", + "html_url": "https://github.com/gitcoindev", + "followers_url": "https://api.github.com/users/gitcoindev/followers", + "following_url": "https://api.github.com/users/gitcoindev/following{/other_user}", + "gists_url": "https://api.github.com/users/gitcoindev/gists{/gist_id}", + "starred_url": "https://api.github.com/users/gitcoindev/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitcoindev/subscriptions", + "organizations_url": "https://api.github.com/users/gitcoindev/orgs", + "repos_url": "https://api.github.com/users/gitcoindev/repos", + "events_url": "https://api.github.com/users/gitcoindev/events{/privacy}", + "received_events_url": "https://api.github.com/users/gitcoindev/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2024-02-16T18:19:52Z", + "updated_at": "2024-02-16T18:25:38Z", + "author_association": "CONTRIBUTOR", + "body": "No way, full details are available in plain sight, only for test in production purposes", + "reactions": { + "url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/comments/1949046925/reactions", + "total_count": 1, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 1 + }, + "performed_via_github_app": null + }, + { + "url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/comments/1949196677", + "html_url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949196677", + "issue_url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/25", + "id": 1949196677, + "node_id": "IC_kwDOK87YcM50LmGF", + "user": { + "login": "0x4007", + "id": 4975670, + "node_id": "MDQ6VXNlcjQ5NzU2NzA=", + "avatar_url": "https://avatars.githubusercontent.com/u/4975670?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/0x4007", + "html_url": "https://github.com/0x4007", + "followers_url": "https://api.github.com/users/0x4007/followers", + "following_url": "https://api.github.com/users/0x4007/following{/other_user}", + "gists_url": "https://api.github.com/users/0x4007/gists{/gist_id}", + "starred_url": "https://api.github.com/users/0x4007/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/0x4007/subscriptions", + "organizations_url": "https://api.github.com/users/0x4007/orgs", + "repos_url": "https://api.github.com/users/0x4007/repos", + "events_url": "https://api.github.com/users/0x4007/events{/privacy}", + "received_events_url": "https://api.github.com/users/0x4007/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2024-02-16T19:27:30Z", + "updated_at": "2024-02-16T19:27:30Z", + "author_association": "MEMBER", + "body": "I was editing this right now but was too slow to push.", + "reactions": { + "url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/comments/1949196677/reactions", + "total_count": 1, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 1 + }, + "performed_via_github_app": null + } +] diff --git a/tests/__mocks__/routes/issue-events-2-get.json b/tests/__mocks__/routes/issue-events-2-get.json new file mode 100644 index 00000000..576662ec --- /dev/null +++ b/tests/__mocks__/routes/issue-events-2-get.json @@ -0,0 +1,32 @@ +[ + { + "id": 11835426216, + "node_id": "SE_lADOK87YcM5_fo85zwAAAALBckWo", + "url": "https://api.github.com/repos/ubiquibot/comment-incentives/issues/events/11835426216", + "actor": { + "login": "0x4007", + "id": 4975670, + "node_id": "MDQ6VXNlcjQ5NzU2NzA=", + "avatar_url": "https://avatars.githubusercontent.com/u/4975670?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/0x4007", + "html_url": "https://github.com/0x4007", + "followers_url": "https://api.github.com/users/0x4007/followers", + "following_url": "https://api.github.com/users/0x4007/following{/other_user}", + "gists_url": "https://api.github.com/users/0x4007/gists{/gist_id}", + "starred_url": "https://api.github.com/users/0x4007/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/0x4007/subscriptions", + "organizations_url": "https://api.github.com/users/0x4007/orgs", + "repos_url": "https://api.github.com/users/0x4007/repos", + "events_url": "https://api.github.com/users/0x4007/events{/privacy}", + "received_events_url": "https://api.github.com/users/0x4007/received_events", + "type": "User", + "site_admin": false + }, + "event": "subscribed", + "commit_id": null, + "commit_url": null, + "created_at": "2024-02-17T03:55:29Z", + "performed_via_github_app": null + } +] diff --git a/tests/get-activity.test.ts b/tests/get-activity.test.ts index d0f5fa1d..37db43fd 100644 --- a/tests/get-activity.test.ts +++ b/tests/get-activity.test.ts @@ -1,5 +1,4 @@ import { IssueActivity } from "../src/issue-activity"; -import { Processor } from "../src/parser/processor"; import { parseGitHubUrl } from "../src/start"; // Mock process.argv @@ -17,10 +16,7 @@ describe("GetActivity class", () => { expect(activity.events).toBeTruthy(); expect(activity.comments).toBeTruthy(); expect(Array.isArray(activity.linkedReviews)).toBeTruthy(); - const processor = new Processor(); - await processor.run(activity); - processor.dump(); - }, 30000); + }); it("should create an instance of GetActivity", () => { expect(activity).toBeInstanceOf(IssueActivity); diff --git a/tests/process.issue.test.ts b/tests/process.issue.test.ts index 07109499..18768bc6 100644 --- a/tests/process.issue.test.ts +++ b/tests/process.issue.test.ts @@ -6,9 +6,55 @@ import { server } from "./__mocks__/node"; import { DataPurgeModule } from "../src/parser/data-purge-module"; import userCommentResults from "./__mocks__/results/user-comment-results.json"; import dataPurgeResults from "./__mocks__/results/data-purge-result.json"; +import formattingEvaluatorResults from "./__mocks__/results/formatting-evaluator-results.json"; +import permitGenerationResults from "./__mocks__/results/permit-generation-results.json"; +import contentEvaluatorResults from "./__mocks__/results/content-evaluator-results.json"; +import githubCommentResults from "./__mocks__/results/github-comment-results.json"; +import dbSeed from "./__mocks__/db-seed.json"; +import { FormattingEvaluatorModule } from "../src/parser/formatting-evaluator-module"; +import { ContentEvaluatorModule } from "../src/parser/content-evaluator-module"; +import Decimal from "decimal.js"; +import { PermitGenerationModule } from "../src/parser/permit-generation-module"; +import { db as mockDb } from "./__mocks__/db"; +import { GithubCommentModule } from "../src/parser/github-comment-module"; +import fs from "fs"; const issueUrl = process.env.TEST_ISSUE_URL || "https://github.com/ubiquibot/comment-incentives/issues/22"; +jest.spyOn(ContentEvaluatorModule.prototype, "_evaluateComments").mockImplementation((specification, comments) => { + return Promise.resolve(comments.map(() => new Decimal(0.8))); +}); + +jest.mock("@ubiquibot/permit-generation/core", () => { + const originalModule = jest.requireActual("@ubiquibot/permit-generation/core"); + + return { + __esModule: true, + ...originalModule, + createAdapters: jest.fn(() => { + return { + supabase: { + wallet: { + getWalletByUserId: jest.fn((userId: number) => { + const wallet = mockDb.wallets.findFirst({ + where: { + userId: { + equals: userId, + }, + }, + }); + if (!wallet) { + return Promise.resolve(null); + } + return Promise.resolve(wallet.address); + }), + }, + }, + }; + }), + }; +}); + beforeAll(() => server.listen()); afterEach(() => server.resetHandlers()); afterAll(() => server.close()); @@ -19,6 +65,12 @@ describe("Modules tests", () => { beforeAll(async () => { await activity.init(); + for (const item of dbSeed.users) { + mockDb.users.create(item); + } + for (const item of dbSeed.wallets) { + mockDb.wallets.create(item); + } }); it("Should extract users from comments", async () => { @@ -28,6 +80,7 @@ describe("Modules tests", () => { await processor.run(activity); processor.dump(); expect(logSpy).toHaveBeenCalledWith(JSON.stringify(userCommentResults, undefined, 2)); + logSpy.mockReset(); }); it("Should purge data", async () => { @@ -37,5 +90,65 @@ describe("Modules tests", () => { await processor.run(activity); processor.dump(); expect(logSpy).toHaveBeenCalledWith(JSON.stringify(dataPurgeResults, undefined, 2)); + logSpy.mockReset(); + }); + + it("Should evaluate formatting", async () => { + const logSpy = jest.spyOn(console, "log"); + const processor = new Processor(); + processor["_transformers"] = [new UserExtractorModule(), new DataPurgeModule(), new FormattingEvaluatorModule()]; + await processor.run(activity); + processor.dump(); + expect(logSpy).toHaveBeenCalledWith(JSON.stringify(formattingEvaluatorResults, undefined, 2)); + logSpy.mockReset(); + }); + + it("Should evaluate content", async () => { + const logSpy = jest.spyOn(console, "log"); + const processor = new Processor(); + processor["_transformers"] = [ + new UserExtractorModule(), + new DataPurgeModule(), + new FormattingEvaluatorModule(), + new ContentEvaluatorModule(), + ]; + await processor.run(activity); + processor.dump(); + expect(logSpy).toHaveBeenCalledWith(JSON.stringify(contentEvaluatorResults, undefined, 2)); + logSpy.mockReset(); + }); + + it("Should generate permits", async () => { + const logSpy = jest.spyOn(console, "log"); + const processor = new Processor(); + processor["_transformers"] = [ + new UserExtractorModule(), + new DataPurgeModule(), + new FormattingEvaluatorModule(), + new ContentEvaluatorModule(), + new PermitGenerationModule(), + ]; + await processor.run(activity); + processor.dump(); + expect(logSpy).toHaveBeenCalledWith(JSON.stringify(permitGenerationResults, undefined, 2)); + logSpy.mockReset(); + }); + + it("Should generate GitHub comment", async () => { + const logSpy = jest.spyOn(console, "log"); + const processor = new Processor(); + processor["_transformers"] = [ + new UserExtractorModule(), + new DataPurgeModule(), + new FormattingEvaluatorModule(), + new ContentEvaluatorModule(), + new PermitGenerationModule(), + new GithubCommentModule(), + ]; + await processor.run(activity); + processor.dump(); + expect(logSpy).toHaveBeenCalledWith(JSON.stringify(githubCommentResults, undefined, 2)); + expect(fs.readFileSync("./output.html")).toEqual(fs.readFileSync("./tests/__mocks__/results/output.html")); + logSpy.mockReset(); }); }); diff --git a/tsconfig.json b/tsconfig.json index 8fe01bab..54f91018 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,7 +25,7 @@ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ /* Modules */ - "module": "commonjs" /* Specify what module code is generated. */, + "module": "Node16" /* Specify what module code is generated. */, // "rootDir": "./", /* Specify the root folder within your source files. */ // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ diff --git a/yarn.lock b/yarn.lock index a02f22f6..1e496011 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1011,7 +1011,7 @@ resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== -"@babel/runtime@^7.8.4": +"@babel/runtime@^7.21.0", "@babel/runtime@^7.8.4": version "7.24.4" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.4.tgz#de795accd698007a66ba44add6cc86542aff1edd" integrity sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA== @@ -2433,6 +2433,27 @@ resolved "https://registry.yarnpkg.com/@mswjs/cookies/-/cookies-1.1.0.tgz#1528eb43630caf83a1d75d5332b30e75e9bb1b5b" integrity sha512-0ZcCVQxifZmhwNBoQIrystCb+2sWBY2Zw8lpfJBPCHGCA/HWqehITeCRVIv4VMy8MPlaHo2w2pTHFV2pFfqKPw== +"@mswjs/data@0.16.1": + version "0.16.1" + resolved "https://registry.yarnpkg.com/@mswjs/data/-/data-0.16.1.tgz#ee41b95b8f2e954a07b0eb54154592a2459064d1" + integrity sha512-VhJvL/VmgAuU9/tDOcKcxHfNd+8nxYntZnrkaQEQPvZZnFwQQR9bzI1FTRROGxCHVoyfv9v84AEkl/7CIw4FAg== + dependencies: + "@types/lodash" "^4.14.172" + "@types/md5" "^2.3.0" + "@types/pluralize" "^0.0.29" + "@types/uuid" "^8.3.0" + date-fns "^2.21.1" + debug "^4.3.1" + graphql "^16.8.1" + lodash "^4.17.21" + md5 "^2.3.0" + outvariant "^1.2.1" + pluralize "^8.0.0" + strict-event-emitter "^0.5.0" + uuid "^8.3.1" + optionalDependencies: + msw "^2.0.8" + "@mswjs/interceptors@^0.26.14": version "0.26.15" resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.26.15.tgz#256ad5c89f325c87d972cc27fc7d0d6d382ce804" @@ -3014,6 +3035,11 @@ resolved "https://registry.yarnpkg.com/@types/linkify-it/-/linkify-it-3.0.5.tgz#1e78a3ac2428e6d7e6c05c1665c242023a4601d8" integrity sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw== +"@types/lodash@^4.14.172": + version "4.17.0" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.0.tgz#d774355e41f372d5350a4d0714abb48194a489c3" + integrity sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA== + "@types/markdown-it@13.0.7": version "13.0.7" resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-13.0.7.tgz#4a495115f470075bd4434a0438ac477a49c2e152" @@ -3022,6 +3048,11 @@ "@types/linkify-it" "*" "@types/mdurl" "*" +"@types/md5@^2.3.0": + version "2.3.5" + resolved "https://registry.yarnpkg.com/@types/md5/-/md5-2.3.5.tgz#481cef0a896e3a5dcbfc5a8a8b02c05958af48a5" + integrity sha512-/i42wjYNgE6wf0j2bcTX6kuowmdL/6PE4IVitMpm2eYKBUuYCprdcWVK+xEF0gcV6ufMCRhtxmReGfc6hIK7Jw== + "@types/mdurl@*": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/mdurl/-/mdurl-1.0.5.tgz#3e0d2db570e9fb6ccb2dc8fde0be1d79ac810d39" @@ -3088,6 +3119,11 @@ resolved "https://registry.yarnpkg.com/@types/picomatch/-/picomatch-2.3.3.tgz#be60498568c19e989e43fb39aa84be1ed3655e92" integrity sha512-Yll76ZHikRFCyz/pffKGjrCwe/le2CDwOP5F210KQo27kpRE46U2rDnzikNlVn6/ezH3Mhn46bJMTfeVTtcYMg== +"@types/pluralize@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/pluralize/-/pluralize-0.0.29.tgz#6ffa33ed1fc8813c469b859681d09707eb40d03c" + integrity sha512-BYOID+l2Aco2nBik+iYS4SZX0Lf20KPILP5RGmM1IgzdwNdTs0eebiFriOPcej1sX9mLnSoiNte5zcFxssgpGA== + "@types/semver@^7.5.0": version "7.5.8" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" @@ -3108,6 +3144,11 @@ resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== +"@types/uuid@^8.3.0": + version "8.3.4" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" + integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== + "@types/wrap-ansi@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz#18b97a972f94f60a679fd5c796d96421b9abb9fd" @@ -3218,10 +3259,10 @@ "@typescript-eslint/types" "6.21.0" eslint-visitor-keys "^3.4.1" -"@ubiquibot/permit-generation@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@ubiquibot/permit-generation/-/permit-generation-1.2.1.tgz#e4cbeedf5aca9f1b088e4bcf06e97991fe428131" - integrity sha512-OSr4Pfcuy51AeasAKVVGuRcgUE9de7erLiv67dMxewMpCMdM0xZn+ash1FbV5EtbxkNRyO2uu1wCTV/z5cbhUg== +"@ubiquibot/permit-generation@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@ubiquibot/permit-generation/-/permit-generation-1.2.2.tgz#3493b4701e1d9deccd4e4d5c9aef4e3f7b76e4d8" + integrity sha512-782Pd5Ub7T5bjfsPGGhE1LVFWhhyAl20ZX1EgCltGzouHgXdha5NKWYh4aG1DIfx7EVJ/6lUAE2yb1PyqAlb5Q== dependencies: "@actions/core" "^1.10.1" "@actions/github" "^6.0.0" @@ -4205,6 +4246,13 @@ data-view-byte-offset@^1.0.0: es-errors "^1.3.0" is-data-view "^1.0.1" +date-fns@^2.21.1: + version "2.30.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0" + integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== + dependencies: + "@babel/runtime" "^7.21.0" + debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" @@ -6397,7 +6445,7 @@ lodash.upperfirst@^4.3.1: resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" integrity sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg== -lodash@^4.17.15: +lodash@^4.17.15, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -6664,7 +6712,7 @@ ms@^2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -msw@2.2.14: +msw@2.2.14, msw@^2.0.8: version "2.2.14" resolved "https://registry.yarnpkg.com/msw/-/msw-2.2.14.tgz#ed16b89f99ffc105a84b0295a6fcae2ee99f5c62" integrity sha512-64i8rNCa1xzDK8ZYsTrVMli05D687jty8+Th+PU5VTbJ2/4P7fkQFVyDQ6ZFT5FrNR8z2BHhbY47fKNvfHrumA== @@ -7135,6 +7183,11 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +pluralize@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" + integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== + possible-typed-array-names@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" @@ -7706,7 +7759,7 @@ statuses@^2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== -strict-event-emitter@^0.5.1: +strict-event-emitter@^0.5.0, strict-event-emitter@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz#1602ece81c51574ca39c6815e09f1a3e8550bd93" integrity sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ== @@ -8264,7 +8317,7 @@ util-deprecate@^1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -uuid@^8.3.2: +uuid@^8.3.1, uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==