diff --git a/README.md b/README.md index bfaabd59..de984994 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ Here is a possible valid configuration to enable this plugin. See [these files]( ```yaml plugin: ubiquibot/conversation-rewards with: + logLevel: "info" evmNetworkId: 100 evmPrivateEncrypted: "encrypted-key" erc20RewardToken: "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d" diff --git a/src/configuration/incentives.ts b/src/configuration/incentives.ts index ac31d884..308adb56 100644 --- a/src/configuration/incentives.ts +++ b/src/configuration/incentives.ts @@ -1,4 +1,5 @@ import { StaticDecode, Type as T } from "@sinclair/typebox"; +import { LOG_LEVEL } from "@ubiquity-dao/ubiquibot-logger"; import { StandardValidator } from "typebox-validators"; import { contentEvaluatorConfigurationType } from "./content-evaluator-config"; import { dataCollectionConfigurationType } from "./data-collection-config"; @@ -10,6 +11,7 @@ import { userExtractorConfigurationType } from "./user-extractor-config"; export const incentivesConfigurationSchema = T.Object( { + logLevel: T.Enum(LOG_LEVEL, { default: LOG_LEVEL.INFO }), /** * Network ID to run in, default to 100 */ diff --git a/src/helpers/logger.ts b/src/helpers/logger.ts index c37bb718..2138abe0 100644 --- a/src/helpers/logger.ts +++ b/src/helpers/logger.ts @@ -1,5 +1,6 @@ import { Logs } from "@ubiquity-dao/ubiquibot-logger"; +import configuration from "../configuration/config-reader"; -const logger = new Logs("debug"); +const logger = new Logs(configuration.logLevel); export default logger; diff --git a/src/index.ts b/src/index.ts index cc0e1137..538d118b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,7 +10,7 @@ export default run() return result; }) .catch(async (e) => { - const errorMessage = logger.error(`Failed to run comment evaluation. ${e.logMessage?.raw || e}`, e); + const errorMessage = logger.error(`Failed to run comment evaluation. ${e?.logMessage?.raw || e}`, e); try { await githubCommentModuleInstance.postComment( `${errorMessage?.logMessage.diff}\n` diff --git a/src/parser/data-purge-module.ts b/src/parser/data-purge-module.ts index b329c809..511af9b9 100644 --- a/src/parser/data-purge-module.ts +++ b/src/parser/data-purge-module.ts @@ -26,6 +26,8 @@ export class DataPurgeModule implements Module { .replace(/^>.*$/gm, "") // Remove commands such as /start .replace(/^\/.+/g, "") + // Remove HTML comments + .replace(//g, "") // Keep only one new line needed by markdown-it package to convert to html .replace(/\n\s*\n/g, "\n") .trim(); diff --git a/src/parser/formatting-evaluator-module.ts b/src/parser/formatting-evaluator-module.ts index 5d9f4064..35eb83ab 100644 --- a/src/parser/formatting-evaluator-module.ts +++ b/src/parser/formatting-evaluator-module.ts @@ -108,7 +108,9 @@ export class FormattingEvaluatorModule implements Module { } _getFormattingScore(comment: GithubCommentScore) { - const html = this._md.render(comment.content); + // Change the \r to \n to fix markup interpretation + const html = this._md.render(comment.content.replaceAll("\r", "\n")); + logger.debug("Will analyze formatting for the current content", { comment: comment.content, html }); const temp = new JSDOM(html); if (temp.window.document.body) { const res = this.classifyTagsWithWordCount(temp.window.document.body, comment.type); @@ -118,7 +120,7 @@ export class FormattingEvaluatorModule implements Module { } } - _countWords(regexes: FormattingEvaluatorConfiguration["multipliers"][0]["rewards"]["regex"], text: string) { + _countSymbols(regexes: FormattingEvaluatorConfiguration["multipliers"][0]["rewards"]["regex"], text: string) { const counts: { [p: string]: { count: number; multiplier: number } } = {}; for (const [regex, multiplier] of Object.entries(regexes)) { const match = text.trim().match(new RegExp(regex, "g")); @@ -139,17 +141,36 @@ export class FormattingEvaluatorModule implements Module { for (const element of elements) { const tagName = element.tagName.toLowerCase(); - const wordCount = this._countWords(this._multipliers[commentType].regex, element.textContent || ""); + // We cannot use textContent otherwise we would duplicate counts, so instead we extract text nodes + const textNodes = Array.from(element?.childNodes || []).filter((node) => node.nodeType === 3); + const innerText = textNodes + .map((node) => node.nodeValue?.trim()) + .join(" ") + .trim(); + const symbols = this._countSymbols(this._multipliers[commentType].regex, innerText); let score = 0; if (this._multipliers[commentType]?.html[tagName] !== undefined) { score = this._multipliers[commentType].html[tagName]; } else { logger.error(`Could not find multiplier for comment [${commentType}], <${tagName}>`); } - tagWordCount[tagName] = { - symbols: wordCount, - score, - }; + logger.debug("Tag content results", { tagName, symbols, text: element.textContent }); + // If we already had that tag included in the result, merge them and update total count + if (Object.keys(tagWordCount).includes(tagName)) { + for (const [k, v] of Object.entries(symbols)) { + if (Object.keys(tagWordCount[tagName].symbols).includes(k)) { + tagWordCount[tagName].symbols[k] = { + ...tagWordCount[tagName].symbols[k], + count: tagWordCount[tagName].symbols[k].count + v.count, + }; + } + } + } else { + tagWordCount[tagName] = { + symbols: symbols, + score, + }; + } } return tagWordCount; diff --git a/tests/__mocks__/results/content-evaluator-results.json b/tests/__mocks__/results/content-evaluator-results.json index 6a5cea5d..6cad6852 100644 --- a/tests/__mocks__/results/content-evaluator-results.json +++ b/tests/__mocks__/results/content-evaluator-results.json @@ -68,7 +68,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 71, + "count": 69, "multiplier": 0.2 } } @@ -77,7 +77,7 @@ "multiplier": 1 }, "relevance": 0.8, - "reward": 6.28 + "reward": 6.136 }, "type": "ISSUE_AUTHOR", "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949203681" @@ -164,7 +164,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 2, + "count": 4, "multiplier": 0.1 } } @@ -182,7 +182,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 35, + "count": 3, "multiplier": 0.1 } } @@ -191,7 +191,7 @@ "score": 0, "symbols": { "\\b\\w+\\b": { - "count": 52, + "count": 1, "multiplier": 0.1 } } @@ -200,7 +200,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 20, + "count": 54, "multiplier": 0.1 } } @@ -209,7 +209,7 @@ "multiplier": 1 }, "relevance": 1, - "reward": 3.51 + "reward": 3.55 }, "type": "ISSUE_SPECIFICATION", "url": "https://github.com/ubiquibot/comment-incentives/issues/22" @@ -281,7 +281,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 1, + "count": 205, "multiplier": 0.1 } } @@ -299,7 +299,16 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 641, + "count": 441, + "multiplier": 0.1 + } + } + }, + "pre": { + "score": 0, + "symbols": { + "\\b\\w+\\b": { + "count": 2, "multiplier": 0.1 } } @@ -308,7 +317,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 4, + "count": 1, "multiplier": 0.1 } } @@ -317,13 +326,13 @@ "multiplier": 1 }, "relevance": 1, - "reward": 25.02 + "reward": 27.3 }, "type": "PULL_COLLABORATOR", "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949196678" } ], - "total": 46.472, + "total": 48.648, "userId": 4975670 }, "gitcoindev": { @@ -453,7 +462,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 15, + "count": 16, "multiplier": 0.1 } } @@ -462,7 +471,7 @@ "multiplier": 0.25 }, "relevance": 0.8, - "reward": 0.2 + "reward": 0.208 }, "type": "ISSUE_CONTRIBUTOR", "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948916343" @@ -636,7 +645,7 @@ "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044855" } ], - "total": 1.368, + "total": 1.376, "userId": 41552663 } } diff --git a/tests/__mocks__/results/formatting-evaluator-results.json b/tests/__mocks__/results/formatting-evaluator-results.json index 6378e58f..fb8c3602 100644 --- a/tests/__mocks__/results/formatting-evaluator-results.json +++ b/tests/__mocks__/results/formatting-evaluator-results.json @@ -66,7 +66,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 71, + "count": 69, "multiplier": 0.2 } } @@ -74,7 +74,7 @@ }, "multiplier": 1 }, - "reward": 7.85 + "reward": 7.67 }, "type": "ISSUE_AUTHOR", "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949203681" @@ -158,7 +158,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 2, + "count": 4, "multiplier": 0.1 } } @@ -176,7 +176,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 35, + "count": 3, "multiplier": 0.1 } } @@ -185,7 +185,7 @@ "score": 0, "symbols": { "\\b\\w+\\b": { - "count": 52, + "count": 1, "multiplier": 0.1 } } @@ -194,7 +194,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 20, + "count": 54, "multiplier": 0.1 } } @@ -202,7 +202,7 @@ }, "multiplier": 1 }, - "reward": 3.51 + "reward": 3.55 }, "type": "ISSUE_SPECIFICATION", "url": "https://github.com/ubiquibot/comment-incentives/issues/22" @@ -272,7 +272,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 1, + "count": 205, "multiplier": 0.1 } } @@ -290,7 +290,16 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 641, + "count": 441, + "multiplier": 0.1 + } + } + }, + "pre": { + "score": 0, + "symbols": { + "\\b\\w+\\b": { + "count": 2, "multiplier": 0.1 } } @@ -299,7 +308,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 4, + "count": 1, "multiplier": 0.1 } } @@ -307,13 +316,13 @@ }, "multiplier": 1 }, - "reward": 25.02 + "reward": 27.3 }, "type": "PULL_COLLABORATOR", "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949196678" } ], - "total": 50.62, + "total": 52.76, "userId": 4975670 }, "gitcoindev": { @@ -439,7 +448,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 15, + "count": 16, "multiplier": 0.1 } } @@ -447,7 +456,7 @@ }, "multiplier": 0.25 }, - "reward": 0.25 + "reward": 0.26 }, "type": "ISSUE_CONTRIBUTOR", "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948916343" @@ -614,7 +623,7 @@ "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044855" } ], - "total": 1.63, + "total": 1.64, "userId": 41552663 } } diff --git a/tests/__mocks__/results/github-comment-results.json b/tests/__mocks__/results/github-comment-results.json index 8de31271..4d494d3c 100644 --- a/tests/__mocks__/results/github-comment-results.json +++ b/tests/__mocks__/results/github-comment-results.json @@ -68,7 +68,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 71, + "count": 69, "multiplier": 0.2 } } @@ -77,7 +77,7 @@ "multiplier": 1 }, "relevance": 0.8, - "reward": 6.28 + "reward": 6.136 }, "type": "ISSUE_AUTHOR", "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949203681" @@ -164,7 +164,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 2, + "count": 4, "multiplier": 0.1 } } @@ -182,7 +182,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 35, + "count": 3, "multiplier": 0.1 } } @@ -191,7 +191,7 @@ "score": 0, "symbols": { "\\b\\w+\\b": { - "count": 52, + "count": 1, "multiplier": 0.1 } } @@ -200,7 +200,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 20, + "count": 54, "multiplier": 0.1 } } @@ -209,7 +209,7 @@ "multiplier": 1 }, "relevance": 1, - "reward": 3.51 + "reward": 3.55 }, "type": "ISSUE_SPECIFICATION", "url": "https://github.com/ubiquibot/comment-incentives/issues/22" @@ -281,7 +281,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 1, + "count": 205, "multiplier": 0.1 } } @@ -299,7 +299,16 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 641, + "count": 441, + "multiplier": 0.1 + } + } + }, + "pre": { + "score": 0, + "symbols": { + "\\b\\w+\\b": { + "count": 2, "multiplier": 0.1 } } @@ -308,7 +317,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 4, + "count": 1, "multiplier": 0.1 } } @@ -317,15 +326,15 @@ "multiplier": 1 }, "relevance": 1, - "reward": 25.02 + "reward": 27.3 }, "type": "PULL_COLLABORATOR", "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949196678" } ], - "evaluationCommentHtml": "

[ 46.472 WXDAI ]

@0x4007
Contributions Overview
View Contribution Count Reward
Issue Specification 1 3.51
Issue Comment 6 16.592
Review Comment 3 26.37
Conversation Incentives
Comment Formatting Relevance Reward
Can somebody work on generating a new `X25519_PRIVATE_KEY …
3.51
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 20
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \\b\\w+\\b:
        count: 2
        multiplier: 0.1
    score: 1
  ol:
    symbols:
      \\b\\w+\\b:
        count: 52
        multiplier: 0.1
    score: 0
  li:
    symbols:
      \\b\\w+\\b:
        count: 35
        multiplier: 0.1
    score: 1
  em:
    symbols:
      \\b\\w+\\b:
        count: 15
        multiplier: 0.1
    score: 0
multiplier: 1
1 3.51
Link below for conversation context. It was to me. Anyways you n…
2.66
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 21
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 2.128
In the repository secrets I think I need to change the key to ma…
2.11
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 16
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 1.688
I just changed it to `627H-BcWbcp_O3YmQGIA6MqgxVsFuplFCA9DK3…
7.85
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 71
        multiplier: 0.2
    score: 1
  code:
    symbols:
      \\b\\w+\\b:
        count: 2
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 6.28
I don't understand what you mean by this
1.29
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 9
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 1.032
I'll investigate more on my computer later.
1.17
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 8
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 0.936
Will it be an issue if I revert to the commit and secret that I …
5.66
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 51
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 4.528
Need to document a private key too
0.52
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 7
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.52
I was editing this right now but was too slow to push.
0.83
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 12
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.83
I am quoting some code! <task-lists sortable=\"\"> <tab…
25.02
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 641
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \\b\\w+\\b:
        count: 1
        multiplier: 0.1
    score: 1
  a:
    symbols:
      \\b\\w+\\b:
        count: 1
        multiplier: 0.1
    score: 1
  ul:
    symbols:
      \\b\\w+\\b:
        count: 4
        multiplier: 0.1
    score: 1
  li:
    symbols:
      \\b\\w+\\b:
        count: 2
        multiplier: 0.1
    score: 1
multiplier: 1
1 25.02
", - "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiI0NjQ3MjAwMDAwMDAwMDAwMDAwMCJ9LCJub25jZSI6IjMzOTI5NDE3NjI3OTM5NzU1OTMxNzgxMTE1NjU5ODM3OTc0NzU4OTQwMzc0OTU0MDQxMzEyODYzODI3ODA0MTE2ODc3MDgzNTI4ODgiLCJkZWFkbGluZSI6IjU3ODk2MDQ0NjE4NjU4MDk3NzExNzg1NDkyNTA0MzQzOTUzOTI2NjM0OTkyMzMyODIwMjgyMDE5NzI4NzkyMDAzOTU2NTY0ODE5OTY3In0sInRyYW5zZmVyRGV0YWlscyI6eyJ0byI6IjB4NEQwNzA0ZjQwMEQ1N0JhOTNlRWE4ODc2NUMzRmNEQkQ4MjZkQ0ZjNCIsInJlcXVlc3RlZEFtb3VudCI6IjQ2NDcyMDAwMDAwMDAwMDAwMDAwIn0sIm93bmVyIjoiMHhkOTUzMEYzZmJCRWExMWJlRDAxREMwOUU3OTMxOGYyZjIwMjIzNzE2Iiwic2lnbmF0dXJlIjoiMHg0NzY3MGFhMWYzOTJlODkxNDZhNzI5Yjc1NjVkMDBmZGVmMzQ3OTg5NjFkNjk4NWFmZjYzNDc5ZTM5MWZjMjQ1MWI0ZDUxZTk3M2FhZTI3YWRmMmY1MTMxYjA2ZjZkMmU0ODcwNWUwMzRjMzEwYWFiZjk1MDc4ZGU1ZjdmMTNiYzFiIiwibmV0d29ya0lkIjoxMDB9XQ==", - "total": 46.472, + "evaluationCommentHtml": "

[ 48.648 WXDAI ]

@0x4007
Contributions Overview
View Contribution Count Reward
Issue Specification 1 3.55
Issue Comment 6 16.448
Review Comment 3 28.65
Conversation Incentives
Comment Formatting Relevance Reward
Can somebody work on generating a new `X25519_PRIVATE_KEY …
3.55
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 54
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \\b\\w+\\b:
        count: 4
        multiplier: 0.1
    score: 1
  ol:
    symbols:
      \\b\\w+\\b:
        count: 1
        multiplier: 0.1
    score: 0
  li:
    symbols:
      \\b\\w+\\b:
        count: 3
        multiplier: 0.1
    score: 1
  em:
    symbols:
      \\b\\w+\\b:
        count: 15
        multiplier: 0.1
    score: 0
multiplier: 1
1 3.55
Link below for conversation context. It was to me. Anyways you n…
2.66
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 21
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 2.128
In the repository secrets I think I need to change the key to ma…
2.11
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 16
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 1.688
I just changed it to `627H-BcWbcp_O3YmQGIA6MqgxVsFuplFCA9DK3…
7.67
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 69
        multiplier: 0.2
    score: 1
  code:
    symbols:
      \\b\\w+\\b:
        count: 2
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 6.136
I don't understand what you mean by this
1.29
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 9
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 1.032
I'll investigate more on my computer later.
1.17
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 8
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 0.936
Will it be an issue if I revert to the commit and secret that I …
5.66
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 51
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 4.528
Need to document a private key too
0.52
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 7
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.52
I was editing this right now but was too slow to push.
0.83
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 12
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.83
I am quoting some code! <task-lists sortable=\"\"> <tab…
27.3
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 441
        multiplier: 0.1
    score: 1
  pre:
    symbols:
      \\b\\w+\\b:
        count: 2
        multiplier: 0.1
    score: 0
  code:
    symbols:
      \\b\\w+\\b:
        count: 205
        multiplier: 0.1
    score: 1
  a:
    symbols:
      \\b\\w+\\b:
        count: 1
        multiplier: 0.1
    score: 1
  ul:
    symbols:
      \\b\\w+\\b:
        count: 1
        multiplier: 0.1
    score: 1
  li:
    symbols:
      \\b\\w+\\b:
        count: 2
        multiplier: 0.1
    score: 1
multiplier: 1
1 27.3
", + "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiI0ODY0ODAwMDAwMDAwMDAwMDAwMCJ9LCJub25jZSI6IjMzOTI5NDE3NjI3OTM5NzU1OTMxNzgxMTE1NjU5ODM3OTc0NzU4OTQwMzc0OTU0MDQxMzEyODYzODI3ODA0MTE2ODc3MDgzNTI4ODgiLCJkZWFkbGluZSI6IjU3ODk2MDQ0NjE4NjU4MDk3NzExNzg1NDkyNTA0MzQzOTUzOTI2NjM0OTkyMzMyODIwMjgyMDE5NzI4NzkyMDAzOTU2NTY0ODE5OTY3In0sInRyYW5zZmVyRGV0YWlscyI6eyJ0byI6IjB4NEQwNzA0ZjQwMEQ1N0JhOTNlRWE4ODc2NUMzRmNEQkQ4MjZkQ0ZjNCIsInJlcXVlc3RlZEFtb3VudCI6IjQ4NjQ4MDAwMDAwMDAwMDAwMDAwIn0sIm93bmVyIjoiMHhkOTUzMEYzZmJCRWExMWJlRDAxREMwOUU3OTMxOGYyZjIwMjIzNzE2Iiwic2lnbmF0dXJlIjoiMHgwYWE5ZmRhYjAyZWYyM2MxNTcwMDlhODMxYjVkYWVkNjBkNGExNmFmZmMyNDcyOGEzNWY5M2MwNTg2YzFiZmY1NmY0MGYzMjQyMjI3YWIwNTkxZWJlZjdhZTYzODdkMzg5YTZkYmM0ODY5OTg1NDU3NGRmNTM3NTdkN2NkMDE2MjFiIiwibmV0d29ya0lkIjoxMDB9XQ==", + "total": 48.648, "userId": 4975670 }, "gitcoindev": { @@ -457,7 +466,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 15, + "count": 16, "multiplier": 0.1 } } @@ -466,7 +475,7 @@ "multiplier": 0.25 }, "relevance": 0.8, - "reward": 0.2 + "reward": 0.208 }, "type": "ISSUE_CONTRIBUTOR", "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948916343" @@ -640,9 +649,9 @@ "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044855" } ], - "evaluationCommentHtml": "

[ 1.368 WXDAI ]

@molecula451
Contributions Overview
View Contribution Count Reward
Issue Comment 6 1.048
Review Comment 2 0.32
Conversation Incentives
Comment Formatting Relevance Reward
pavlovcik i think we need to update a bit the readme ![image_20…
0.25
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 15
        multiplier: 0.1
    score: 1
  img:
    symbols:
      \\b\\w+\\b:
        count: 1
        multiplier: 0.1
    score: 0
multiplier: 0.25
0.8 0.2
let us know when done
0.1
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 5
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.08
https://github.com/ubiquibot/comment-incentives/actions/runs/793…
0.24
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 14
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.192
@pavlovcik permitted with hard debug (tho no funds in the privat…
0.21
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 12
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.168
pavlovcik i re-generated the X25519 to trigger the permit, what …
0.46
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 31
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.368
sure thing
0.05
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 2
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.04
indeed
0.03
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 1
        multiplier: 0.1
    score: 1
multiplier: 0.25
1 0.03
go to go pavlovick, we'll be using this one for test only or tes…
0.29
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 18
        multiplier: 0.1
    score: 1
multiplier: 0.25
1 0.29
", - "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiIxMzY4MDAwMDAwMDAwMDAwMDAwIn0sIm5vbmNlIjoiMTg0Mjc4OTk1ODM3NTAwODQ0Njg3NTg1NjIxNTU0MzQ5MzU5Nzc1OTU1MDg3MzA3MDMzNTgwODYxNjI3NDIzODg4NzcxNzk5MjA4NTAiLCJkZWFkbGluZSI6IjU3ODk2MDQ0NjE4NjU4MDk3NzExNzg1NDkyNTA0MzQzOTUzOTI2NjM0OTkyMzMyODIwMjgyMDE5NzI4NzkyMDAzOTU2NTY0ODE5OTY3In0sInRyYW5zZmVyRGV0YWlscyI6eyJ0byI6IjB4NEQwNzA0ZjQwMEQ1N0JhOTNlRWE4ODc2NUMzRmNEQkQ4MjZkQ0ZjNCIsInJlcXVlc3RlZEFtb3VudCI6IjEzNjgwMDAwMDAwMDAwMDAwMDAifSwib3duZXIiOiIweGQ5NTMwRjNmYkJFYTExYmVEMDFEQzA5RTc5MzE4ZjJmMjAyMjM3MTYiLCJzaWduYXR1cmUiOiIweGI3YjU5NzRhNWM3ODg5NDc3ODI3ZTg1YzFjMGE5NWEwNmQzNzYzZmZlNTMxY2ZhZjYxMTUxYjQ3ODY3NGMyNTgwMmM5YzBjNmQyODBiMTNhOTk4YjI0OWJkYjMwZjQ3ZjdmOGFmNTI5ZmY1YzczYTk4NzJlOGJkYmVjMzg0Nzg5MWIiLCJuZXR3b3JrSWQiOjEwMH1d", - "total": 1.368, + "evaluationCommentHtml": "

[ 1.376 WXDAI ]

@molecula451
Contributions Overview
View Contribution Count Reward
Issue Comment 6 1.056
Review Comment 2 0.32
Conversation Incentives
Comment Formatting Relevance Reward
pavlovcik i think we need to update a bit the readme ![image_20…
0.26
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 16
        multiplier: 0.1
    score: 1
  img:
    symbols:
      \\b\\w+\\b:
        count: 1
        multiplier: 0.1
    score: 0
multiplier: 0.25
0.8 0.208
let us know when done
0.1
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 5
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.08
https://github.com/ubiquibot/comment-incentives/actions/runs/793…
0.24
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 14
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.192
@pavlovcik permitted with hard debug (tho no funds in the privat…
0.21
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 12
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.168
pavlovcik i re-generated the X25519 to trigger the permit, what …
0.46
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 31
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.368
sure thing
0.05
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 2
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.04
indeed
0.03
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 1
        multiplier: 0.1
    score: 1
multiplier: 0.25
1 0.03
go to go pavlovick, we'll be using this one for test only or tes…
0.29
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 18
        multiplier: 0.1
    score: 1
multiplier: 0.25
1 0.29
", + "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiIxMzc2MDAwMDAwMDAwMDAwMDAwIn0sIm5vbmNlIjoiMTg0Mjc4OTk1ODM3NTAwODQ0Njg3NTg1NjIxNTU0MzQ5MzU5Nzc1OTU1MDg3MzA3MDMzNTgwODYxNjI3NDIzODg4NzcxNzk5MjA4NTAiLCJkZWFkbGluZSI6IjU3ODk2MDQ0NjE4NjU4MDk3NzExNzg1NDkyNTA0MzQzOTUzOTI2NjM0OTkyMzMyODIwMjgyMDE5NzI4NzkyMDAzOTU2NTY0ODE5OTY3In0sInRyYW5zZmVyRGV0YWlscyI6eyJ0byI6IjB4NEQwNzA0ZjQwMEQ1N0JhOTNlRWE4ODc2NUMzRmNEQkQ4MjZkQ0ZjNCIsInJlcXVlc3RlZEFtb3VudCI6IjEzNzYwMDAwMDAwMDAwMDAwMDAifSwib3duZXIiOiIweGQ5NTMwRjNmYkJFYTExYmVEMDFEQzA5RTc5MzE4ZjJmMjAyMjM3MTYiLCJzaWduYXR1cmUiOiIweDA3YTA5YTQwYjNlMWVlZTE4ZDQ1ZjU0YmVlM2RlOGY5MDE0YWYzZGI2MDFjMjE0OTNmM2I1NzkzNjE3NmFhZGQxNGQ3ZWYwNmM1ZWE2MzQ1ZmY4MWVhMDA5NzAwZDc3ZTU1ZTE2YThmZGM4ZmNhZjljMTllYjQ3ZWMxZmRiOGNkMWMiLCJuZXR3b3JrSWQiOjEwMH1d", + "total": 1.376, "userId": 41552663 } } diff --git a/tests/__mocks__/results/output-reward-split.html b/tests/__mocks__/results/output-reward-split.html index 381dd9a0..96ef4789 100644 --- a/tests/__mocks__/results/output-reward-split.html +++ b/tests/__mocks__/results/output-reward-split.html @@ -1,10 +1,10 @@ -

[ 44.884 WXDAI ]

@0x4007
Contributions Overview
View Contribution Count Reward
Issue Task 0.5 25
Issue Specification 1 2.69
Issue Comment 2 3.544
Review Comment 3 13.65
Conversation Incentives
Comment Formatting Relevance Reward
Looks like the filters are barely useable now that we have the s…
2.69
content:
  p:
    symbols:
      \b\w+\b:
        count: 48
        multiplier: 0.1
    score: 1
  img:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
multiplier: 1
1 2.69
Okay both bots are broken @gentlementlegen We should have spli…
1.77
content:
  p:
    symbols:
      \b\w+\b:
        count: 13
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 1.416
Actually, looks like it did the right thing for your reward on v…
2.66
content:
  p:
    symbols:
      \b\w+\b:
        count: 21
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 2.128
Resolves https://github.com/ubiquity/work.ubq.fi/issues/69 <…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 10
        multiplier: 0
    score: 1
  ul:
    symbols:
      \b\w+\b:
        count: 45
        multiplier: 0
    score: 1
  li:
    symbols:
      \b\w+\b:
        count: 35
        multiplier: 0
    score: 1
multiplier: 0
0.8 -
I always struggle with Cypress
1.57
content:
  p:
    symbols:
      \b\w+\b:
        count: 5
        multiplier: 0.2
    score: 1
multiplier: 2
1 1.57
Only doesn't work on my local, the guess is token expiration aft…
12.08
content:
  p:
    symbols:
      \b\w+\b:
        count: 39
        multiplier: 0.2
    score: 1
  a:
    symbols:
      \b\w+\b:
        count: 11
        multiplier: 0.2
    score: 1
multiplier: 2
1 12.08

[ 29.562 WXDAI ]

@gentlementlegen
Contributions Overview
View Contribution Count Reward
Issue Task 0.5 25
Issue Comment 2 2.312
Review Comment 1 2.25
Conversation Incentives
Comment Formatting Relevance Reward
@0x4007 So it should be 25 each? I can confirm this is not handl…
1.54
content:
  p:
    symbols:
      \b\w+\b:
        count: 25
        multiplier: 0.1
    score: 1
multiplier: 1
0.8 1.232
Ah yes because it doesn't apply the `0.5` multiplier I s…
1.35
content:
  p:
    symbols:
      \b\w+\b:
        count: 18
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.1
    score: 1
multiplier: 1
0.8 1.08
After token expiration, I could not reproduce the problem and st…
2.25
content:
  p:
    symbols:
      \b\w+\b:
        count: 39
        multiplier: 0.1
    score: 1
multiplier: 1
1 2.25
+

[ 42.914 WXDAI ]

@0x4007
Contributions Overview
View Contribution Count Reward
Issue Task 0.5 25
Issue Specification 1 2.73
Issue Comment 2 3.544
Review Comment 3 11.64
Conversation Incentives
Comment Formatting Relevance Reward
Looks like the filters are barely useable now that we have the s…
2.73
content:
  p:
    symbols:
      \b\w+\b:
        count: 49
        multiplier: 0.1
    score: 1
  img:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
multiplier: 1
1 2.73
Okay both bots are broken @gentlementlegen We should have spli…
1.77
content:
  p:
    symbols:
      \b\w+\b:
        count: 13
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 1.416
Actually, looks like it did the right thing for your reward on v…
2.66
content:
  p:
    symbols:
      \b\w+\b:
        count: 21
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 2.128
Resolves https://github.com/ubiquity/work.ubq.fi/issues/69
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 10
        multiplier: 0
    score: 1
multiplier: 0
0.8 -
I always struggle with Cypress
1.57
content:
  p:
    symbols:
      \b\w+\b:
        count: 5
        multiplier: 0.2
    score: 1
multiplier: 2
1 1.57
Only doesn't work on my local, the guess is token expiration aft…
10.07
content:
  p:
    symbols:
      \b\w+\b:
        count: 29
        multiplier: 0.2
    score: 1
  a:
    symbols:
      \b\w+\b:
        count: 11
        multiplier: 0.2
    score: 1
multiplier: 2
1 10.07

[ 29.474 WXDAI ]

@gentlementlegen
Contributions Overview
View Contribution Count Reward
Issue Task 0.5 25
Issue Comment 2 2.224
Review Comment 1 2.25
Conversation Incentives
Comment Formatting Relevance Reward
@0x4007 So it should be 25 each? I can confirm this is not handl…
1.54
content:
  p:
    symbols:
      \b\w+\b:
        count: 25
        multiplier: 0.1
    score: 1
multiplier: 1
0.8 1.232
Ah yes because it doesn't apply the `0.5` multiplier I s…
1.24
content:
  p:
    symbols:
      \b\w+\b:
        count: 16
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.1
    score: 1
multiplier: 1
0.8 0.992
After token expiration, I could not reproduce the problem and st…
2.25
content:
  p:
    symbols:
      \b\w+\b:
        count: 39
        multiplier: 0.1
    score: 1
multiplier: 1
1 2.25
\ No newline at end of file diff --git a/tests/__mocks__/results/output.html b/tests/__mocks__/results/output.html index ebf29cf2..7dcf97de 100644 --- a/tests/__mocks__/results/output.html +++ b/tests/__mocks__/results/output.html @@ -1,4 +1,4 @@ -

[ 44.33 WXDAI ]

@gitcoindev
Contributions Overview
View Contribution Count Reward
Issue Task 1 37.5
Issue Comment 1 0
Review Comment 3 6.83
Conversation Incentives
Comment Formatting Relevance Reward
@molecula451 I tried to override X25519_PRIVATE_KEY but it did n…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 49
        multiplier: 0
    score: 1
multiplier: 0
0.8 -
The new evmPrivateKeyEncrypted generated for address 0x3a2E44e10…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 18
        multiplier: 0
    score: 1
multiplier: 0
0.8 -
@pavlovcik @molecula451 please check now again, I added to docs.
2.83
content:
  p:
    symbols:
      \b\w+\b:
        count: 10
        multiplier: 0.2
    score: 1
multiplier: 2
1 2.83
No way, full details are available in plain sight, only for test…
4
content:
  p:
    symbols:
      \b\w+\b:
        count: 15
        multiplier: 0.2
    score: 1
multiplier: 2
1 4

[ 1.368 WXDAI ]

@molecula451
Contributions Overview
View Contribution Count Reward
Issue Comment 6 1.048
Review Comment 2 0.32
Conversation Incentives
Comment Formatting Relevance Reward
pavlovcik i think we need to update a bit the readme ![image_20…
0.25
content:
  p:
    symbols:
      \b\w+\b:
        count: 15
        multiplier: 0.1
    score: 1
  img:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
multiplier: 0.25
0.8 0.2
let us know when done
0.1
content:
  p:
    symbols:
      \b\w+\b:
        count: 5
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.08
https://github.com/ubiquibot/comment-incentives/actions/runs/793…
0.24
content:
  p:
    symbols:
      \b\w+\b:
        count: 14
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.192
@pavlovcik permitted with hard debug (tho no funds in the privat…
0.21
content:
  p:
    symbols:
      \b\w+\b:
        count: 12
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.168
pavlovcik i re-generated the X25519 to trigger the permit, what …
0.46
content:
  p:
    symbols:
      \b\w+\b:
        count: 31
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.368
sure thing
0.05
content:
  p:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.04
indeed
0.03
content:
  p:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 1
multiplier: 0.25
1 0.03
go to go pavlovick, we'll be using this one for test only or tes…
0.29
content:
  p:
    symbols:
      \b\w+\b:
        count: 18
        multiplier: 0.1
    score: 1
multiplier: 0.25
1 0.29

[ 46.472 WXDAI ]

@0x4007
Contributions Overview
View Contribution Count Reward
Issue Specification 1 3.51
Issue Comment 6 16.592
Review Comment 3 26.37
Conversation Incentives
Comment Formatting Relevance Reward
Can somebody work on generating a new `X25519_PRIVATE_KEY …
3.51
content:
  p:
    symbols:
      \b\w+\b:
        count: 20
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.1
    score: 1
  ol:
    symbols:
      \b\w+\b:
        count: 52
        multiplier: 0.1
    score: 0
  li:
    symbols:
      \b\w+\b:
        count: 35
        multiplier: 0.1
    score: 1
  em:
    symbols:
      \b\w+\b:
        count: 15
        multiplier: 0.1
    score: 0
multiplier: 1
1 3.51
Link below for conversation context. It was to me. Anyways you n…
2.66
content:
  p:
    symbols:
      \b\w+\b:
        count: 21
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 2.128
In the repository secrets I think I need to change the key to ma…
2.11
content:
  p:
    symbols:
      \b\w+\b:
        count: 16
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 1.688
I just changed it to `627H-BcWbcp_O3YmQGIA6MqgxVsFuplFCA9DK3…
7.85
content:
  p:
    symbols:
      \b\w+\b:
        count: 71
        multiplier: 0.2
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 6.28
I don't understand what you mean by this
1.29
content:
  p:
    symbols:
      \b\w+\b:
        count: 9
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 1.032
I'll investigate more on my computer later.
1.17
content:
  p:
    symbols:
      \b\w+\b:
        count: 8
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 0.936
Will it be an issue if I revert to the commit and secret that I …
5.66
content:
  p:
    symbols:
      \b\w+\b:
        count: 51
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 4.528
Need to document a private key too
0.52
content:
  p:
    symbols:
      \b\w+\b:
        count: 7
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.52
I was editing this right now but was too slow to push.
0.83
content:
  p:
    symbols:
      \b\w+\b:
        count: 12
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.83
I am quoting some code! <task-lists sortable=""> <tab…
25.02
content:
  p:
    symbols:
      \b\w+\b:
        count: 641
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 1
  a:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 1
  ul:
    symbols:
      \b\w+\b:
        count: 4
        multiplier: 0.1
    score: 1
  li:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.1
    score: 1
multiplier: 1
1 25.02
+

[ 44.33 WXDAI ]

@gitcoindev
Contributions Overview
View Contribution Count Reward
Issue Task 1 37.5
Issue Comment 1 0
Review Comment 3 6.83
Conversation Incentives
Comment Formatting Relevance Reward
@molecula451 I tried to override X25519_PRIVATE_KEY but it did n…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 49
        multiplier: 0
    score: 1
multiplier: 0
0.8 -
The new evmPrivateKeyEncrypted generated for address 0x3a2E44e10…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 18
        multiplier: 0
    score: 1
multiplier: 0
0.8 -
@pavlovcik @molecula451 please check now again, I added to docs.
2.83
content:
  p:
    symbols:
      \b\w+\b:
        count: 10
        multiplier: 0.2
    score: 1
multiplier: 2
1 2.83
No way, full details are available in plain sight, only for test…
4
content:
  p:
    symbols:
      \b\w+\b:
        count: 15
        multiplier: 0.2
    score: 1
multiplier: 2
1 4

[ 1.376 WXDAI ]

@molecula451
Contributions Overview
View Contribution Count Reward
Issue Comment 6 1.056
Review Comment 2 0.32
Conversation Incentives
Comment Formatting Relevance Reward
pavlovcik i think we need to update a bit the readme ![image_20…
0.26
content:
  p:
    symbols:
      \b\w+\b:
        count: 16
        multiplier: 0.1
    score: 1
  img:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
multiplier: 0.25
0.8 0.208
let us know when done
0.1
content:
  p:
    symbols:
      \b\w+\b:
        count: 5
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.08
https://github.com/ubiquibot/comment-incentives/actions/runs/793…
0.24
content:
  p:
    symbols:
      \b\w+\b:
        count: 14
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.192
@pavlovcik permitted with hard debug (tho no funds in the privat…
0.21
content:
  p:
    symbols:
      \b\w+\b:
        count: 12
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.168
pavlovcik i re-generated the X25519 to trigger the permit, what …
0.46
content:
  p:
    symbols:
      \b\w+\b:
        count: 31
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.368
sure thing
0.05
content:
  p:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.1
    score: 1
multiplier: 0.25
0.8 0.04
indeed
0.03
content:
  p:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 1
multiplier: 0.25
1 0.03
go to go pavlovick, we'll be using this one for test only or tes…
0.29
content:
  p:
    symbols:
      \b\w+\b:
        count: 18
        multiplier: 0.1
    score: 1
multiplier: 0.25
1 0.29

[ 48.648 WXDAI ]

@0x4007
Contributions Overview
View Contribution Count Reward
Issue Specification 1 3.55
Issue Comment 6 16.448
Review Comment 3 28.65
Conversation Incentives
Comment Formatting Relevance Reward
Can somebody work on generating a new `X25519_PRIVATE_KEY …
3.55
content:
  p:
    symbols:
      \b\w+\b:
        count: 54
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 4
        multiplier: 0.1
    score: 1
  ol:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
  li:
    symbols:
      \b\w+\b:
        count: 3
        multiplier: 0.1
    score: 1
  em:
    symbols:
      \b\w+\b:
        count: 15
        multiplier: 0.1
    score: 0
multiplier: 1
1 3.55
Link below for conversation context. It was to me. Anyways you n…
2.66
content:
  p:
    symbols:
      \b\w+\b:
        count: 21
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 2.128
In the repository secrets I think I need to change the key to ma…
2.11
content:
  p:
    symbols:
      \b\w+\b:
        count: 16
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 1.688
I just changed it to `627H-BcWbcp_O3YmQGIA6MqgxVsFuplFCA9DK3…
7.67
content:
  p:
    symbols:
      \b\w+\b:
        count: 69
        multiplier: 0.2
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 6.136
I don't understand what you mean by this
1.29
content:
  p:
    symbols:
      \b\w+\b:
        count: 9
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 1.032
I'll investigate more on my computer later.
1.17
content:
  p:
    symbols:
      \b\w+\b:
        count: 8
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 0.936
Will it be an issue if I revert to the commit and secret that I …
5.66
content:
  p:
    symbols:
      \b\w+\b:
        count: 51
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 4.528
Need to document a private key too
0.52
content:
  p:
    symbols:
      \b\w+\b:
        count: 7
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.52
I was editing this right now but was too slow to push.
0.83
content:
  p:
    symbols:
      \b\w+\b:
        count: 12
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.83
I am quoting some code! <task-lists sortable=""> <tab…
27.3
content:
  p:
    symbols:
      \b\w+\b:
        count: 441
        multiplier: 0.1
    score: 1
  pre:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.1
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 205
        multiplier: 0.1
    score: 1
  a:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 1
  ul:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 1
  li:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.1
    score: 1
multiplier: 1
1 27.3
\ No newline at end of file diff --git a/tests/__mocks__/results/permit-generation-results.json b/tests/__mocks__/results/permit-generation-results.json index 869eb85c..bff2209e 100644 --- a/tests/__mocks__/results/permit-generation-results.json +++ b/tests/__mocks__/results/permit-generation-results.json @@ -68,7 +68,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 71, + "count": 69, "multiplier": 0.2 } } @@ -77,7 +77,7 @@ "multiplier": 1 }, "relevance": 0.8, - "reward": 6.28 + "reward": 6.136 }, "type": "ISSUE_AUTHOR", "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1949203681" @@ -164,7 +164,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 2, + "count": 4, "multiplier": 0.1 } } @@ -182,7 +182,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 35, + "count": 3, "multiplier": 0.1 } } @@ -191,7 +191,7 @@ "score": 0, "symbols": { "\\b\\w+\\b": { - "count": 52, + "count": 1, "multiplier": 0.1 } } @@ -200,7 +200,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 20, + "count": 54, "multiplier": 0.1 } } @@ -209,7 +209,7 @@ "multiplier": 1 }, "relevance": 1, - "reward": 3.51 + "reward": 3.55 }, "type": "ISSUE_SPECIFICATION", "url": "https://github.com/ubiquibot/comment-incentives/issues/22" @@ -281,7 +281,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 1, + "count": 205, "multiplier": 0.1 } } @@ -299,7 +299,16 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 641, + "count": 441, + "multiplier": 0.1 + } + } + }, + "pre": { + "score": 0, + "symbols": { + "\\b\\w+\\b": { + "count": 2, "multiplier": 0.1 } } @@ -308,7 +317,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 4, + "count": 1, "multiplier": 0.1 } } @@ -317,14 +326,14 @@ "multiplier": 1 }, "relevance": 1, - "reward": 25.02 + "reward": 27.3 }, "type": "PULL_COLLABORATOR", "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949196678" } ], - "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiI0NjQ3MjAwMDAwMDAwMDAwMDAwMCJ9LCJub25jZSI6IjMzOTI5NDE3NjI3OTM5NzU1OTMxNzgxMTE1NjU5ODM3OTc0NzU4OTQwMzc0OTU0MDQxMzEyODYzODI3ODA0MTE2ODc3MDgzNTI4ODgiLCJkZWFkbGluZSI6IjU3ODk2MDQ0NjE4NjU4MDk3NzExNzg1NDkyNTA0MzQzOTUzOTI2NjM0OTkyMzMyODIwMjgyMDE5NzI4NzkyMDAzOTU2NTY0ODE5OTY3In0sInRyYW5zZmVyRGV0YWlscyI6eyJ0byI6IjB4NEQwNzA0ZjQwMEQ1N0JhOTNlRWE4ODc2NUMzRmNEQkQ4MjZkQ0ZjNCIsInJlcXVlc3RlZEFtb3VudCI6IjQ2NDcyMDAwMDAwMDAwMDAwMDAwIn0sIm93bmVyIjoiMHhkOTUzMEYzZmJCRWExMWJlRDAxREMwOUU3OTMxOGYyZjIwMjIzNzE2Iiwic2lnbmF0dXJlIjoiMHg0NzY3MGFhMWYzOTJlODkxNDZhNzI5Yjc1NjVkMDBmZGVmMzQ3OTg5NjFkNjk4NWFmZjYzNDc5ZTM5MWZjMjQ1MWI0ZDUxZTk3M2FhZTI3YWRmMmY1MTMxYjA2ZjZkMmU0ODcwNWUwMzRjMzEwYWFiZjk1MDc4ZGU1ZjdmMTNiYzFiIiwibmV0d29ya0lkIjoxMDB9XQ==", - "total": 46.472, + "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiI0ODY0ODAwMDAwMDAwMDAwMDAwMCJ9LCJub25jZSI6IjMzOTI5NDE3NjI3OTM5NzU1OTMxNzgxMTE1NjU5ODM3OTc0NzU4OTQwMzc0OTU0MDQxMzEyODYzODI3ODA0MTE2ODc3MDgzNTI4ODgiLCJkZWFkbGluZSI6IjU3ODk2MDQ0NjE4NjU4MDk3NzExNzg1NDkyNTA0MzQzOTUzOTI2NjM0OTkyMzMyODIwMjgyMDE5NzI4NzkyMDAzOTU2NTY0ODE5OTY3In0sInRyYW5zZmVyRGV0YWlscyI6eyJ0byI6IjB4NEQwNzA0ZjQwMEQ1N0JhOTNlRWE4ODc2NUMzRmNEQkQ4MjZkQ0ZjNCIsInJlcXVlc3RlZEFtb3VudCI6IjQ4NjQ4MDAwMDAwMDAwMDAwMDAwIn0sIm93bmVyIjoiMHhkOTUzMEYzZmJCRWExMWJlRDAxREMwOUU3OTMxOGYyZjIwMjIzNzE2Iiwic2lnbmF0dXJlIjoiMHgwYWE5ZmRhYjAyZWYyM2MxNTcwMDlhODMxYjVkYWVkNjBkNGExNmFmZmMyNDcyOGEzNWY5M2MwNTg2YzFiZmY1NmY0MGYzMjQyMjI3YWIwNTkxZWJlZjdhZTYzODdkMzg5YTZkYmM0ODY5OTg1NDU3NGRmNTM3NTdkN2NkMDE2MjFiIiwibmV0d29ya0lkIjoxMDB9XQ==", + "total": 48.648, "userId": 4975670 }, "gitcoindev": { @@ -455,7 +464,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 15, + "count": 16, "multiplier": 0.1 } } @@ -464,7 +473,7 @@ "multiplier": 0.25 }, "relevance": 0.8, - "reward": 0.2 + "reward": 0.208 }, "type": "ISSUE_CONTRIBUTOR", "url": "https://github.com/ubiquibot/comment-incentives/issues/22#issuecomment-1948916343" @@ -638,8 +647,8 @@ "url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044855" } ], - "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiIxMzY4MDAwMDAwMDAwMDAwMDAwIn0sIm5vbmNlIjoiMTg0Mjc4OTk1ODM3NTAwODQ0Njg3NTg1NjIxNTU0MzQ5MzU5Nzc1OTU1MDg3MzA3MDMzNTgwODYxNjI3NDIzODg4NzcxNzk5MjA4NTAiLCJkZWFkbGluZSI6IjU3ODk2MDQ0NjE4NjU4MDk3NzExNzg1NDkyNTA0MzQzOTUzOTI2NjM0OTkyMzMyODIwMjgyMDE5NzI4NzkyMDAzOTU2NTY0ODE5OTY3In0sInRyYW5zZmVyRGV0YWlscyI6eyJ0byI6IjB4NEQwNzA0ZjQwMEQ1N0JhOTNlRWE4ODc2NUMzRmNEQkQ4MjZkQ0ZjNCIsInJlcXVlc3RlZEFtb3VudCI6IjEzNjgwMDAwMDAwMDAwMDAwMDAifSwib3duZXIiOiIweGQ5NTMwRjNmYkJFYTExYmVEMDFEQzA5RTc5MzE4ZjJmMjAyMjM3MTYiLCJzaWduYXR1cmUiOiIweGI3YjU5NzRhNWM3ODg5NDc3ODI3ZTg1YzFjMGE5NWEwNmQzNzYzZmZlNTMxY2ZhZjYxMTUxYjQ3ODY3NGMyNTgwMmM5YzBjNmQyODBiMTNhOTk4YjI0OWJkYjMwZjQ3ZjdmOGFmNTI5ZmY1YzczYTk4NzJlOGJkYmVjMzg0Nzg5MWIiLCJuZXR3b3JrSWQiOjEwMH1d", - "total": 1.368, + "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiIxMzc2MDAwMDAwMDAwMDAwMDAwIn0sIm5vbmNlIjoiMTg0Mjc4OTk1ODM3NTAwODQ0Njg3NTg1NjIxNTU0MzQ5MzU5Nzc1OTU1MDg3MzA3MDMzNTgwODYxNjI3NDIzODg4NzcxNzk5MjA4NTAiLCJkZWFkbGluZSI6IjU3ODk2MDQ0NjE4NjU4MDk3NzExNzg1NDkyNTA0MzQzOTUzOTI2NjM0OTkyMzMyODIwMjgyMDE5NzI4NzkyMDAzOTU2NTY0ODE5OTY3In0sInRyYW5zZmVyRGV0YWlscyI6eyJ0byI6IjB4NEQwNzA0ZjQwMEQ1N0JhOTNlRWE4ODc2NUMzRmNEQkQ4MjZkQ0ZjNCIsInJlcXVlc3RlZEFtb3VudCI6IjEzNzYwMDAwMDAwMDAwMDAwMDAifSwib3duZXIiOiIweGQ5NTMwRjNmYkJFYTExYmVEMDFEQzA5RTc5MzE4ZjJmMjAyMjM3MTYiLCJzaWduYXR1cmUiOiIweDA3YTA5YTQwYjNlMWVlZTE4ZDQ1ZjU0YmVlM2RlOGY5MDE0YWYzZGI2MDFjMjE0OTNmM2I1NzkzNjE3NmFhZGQxNGQ3ZWYwNmM1ZWE2MzQ1ZmY4MWVhMDA5NzAwZDc3ZTU1ZTE2YThmZGM4ZmNhZjljMTllYjQ3ZWMxZmRiOGNkMWMiLCJuZXR3b3JrSWQiOjEwMH1d", + "total": 1.376, "userId": 41552663 } } diff --git a/tests/__mocks__/results/reward-split.json b/tests/__mocks__/results/reward-split.json index 6d309fb5..53f9ce0d 100644 --- a/tests/__mocks__/results/reward-split.json +++ b/tests/__mocks__/results/reward-split.json @@ -68,7 +68,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 48, + "count": 49, "multiplier": 0.1 } } @@ -77,26 +77,17 @@ "multiplier": 1 }, "relevance": 1, - "reward": 2.69 + "reward": 2.73 }, "type": "ISSUE_SPECIFICATION", "url": "https://github.com/ubiquity/work.ubq.fi/issues/69" }, { - "content": "Resolves https://github.com/ubiquity/work.ubq.fi/issues/69\r\n", + "content": "Resolves https://github.com/ubiquity/work.ubq.fi/issues/69", "id": 1935493667, "score": { "formatting": { "content": { - "li": { - "score": 1, - "symbols": { - "\\b\\w+\\b": { - "count": 35, - "multiplier": 0 - } - } - }, "p": { "score": 1, "symbols": { @@ -105,15 +96,6 @@ "multiplier": 0 } } - }, - "ul": { - "score": 1, - "symbols": { - "\\b\\w+\\b": { - "count": 45, - "multiplier": 0 - } - } } }, "multiplier": 0 @@ -167,7 +149,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 39, + "count": 29, "multiplier": 0.2 } } @@ -176,19 +158,19 @@ "multiplier": 2 }, "relevance": 1, - "reward": 12.08 + "reward": 10.07 }, "type": "PULL_AUTHOR", "url": "https://github.com/ubiquity/work.ubq.fi/pull/70#issuecomment-2186798329" } ], - "evaluationCommentHtml": "

[ 44.884 WXDAI ]

@0x4007
Contributions Overview
View Contribution Count Reward
Issue Task 0.5 25
Issue Specification 1 2.69
Issue Comment 2 3.544
Review Comment 3 13.65
Conversation Incentives
Comment Formatting Relevance Reward
Looks like the filters are barely useable now that we have the s…
2.69
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 48
        multiplier: 0.1
    score: 1
  img:
    symbols:
      \\b\\w+\\b:
        count: 1
        multiplier: 0.1
    score: 0
multiplier: 1
1 2.69
Okay both bots are broken @gentlementlegen We should have spli…
1.77
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 13
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 1.416
Actually, looks like it did the right thing for your reward on v…
2.66
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 21
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 2.128
Resolves https://github.com/ubiquity/work.ubq.fi/issues/69 <…
0
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 10
        multiplier: 0
    score: 1
  ul:
    symbols:
      \\b\\w+\\b:
        count: 45
        multiplier: 0
    score: 1
  li:
    symbols:
      \\b\\w+\\b:
        count: 35
        multiplier: 0
    score: 1
multiplier: 0
0.8 -
I always struggle with Cypress
1.57
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 5
        multiplier: 0.2
    score: 1
multiplier: 2
1 1.57
Only doesn't work on my local, the guess is token expiration aft…
12.08
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 39
        multiplier: 0.2
    score: 1
  a:
    symbols:
      \\b\\w+\\b:
        count: 11
        multiplier: 0.2
    score: 1
multiplier: 2
1 12.08
", - "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiI0NDg4NDAwMDAwMDAwMDAwMDAwMCJ9LCJub25jZSI6IjMzOTI5NDE3NjI3OTM5NzU1OTMxNzgxMTE1NjU5ODM3OTc0NzU4OTQwMzc0OTU0MDQxMzEyODYzODI3ODA0MTE2ODc3MDgzNTI4ODgiLCJkZWFkbGluZSI6IjU3ODk2MDQ0NjE4NjU4MDk3NzExNzg1NDkyNTA0MzQzOTUzOTI2NjM0OTkyMzMyODIwMjgyMDE5NzI4NzkyMDAzOTU2NTY0ODE5OTY3In0sInRyYW5zZmVyRGV0YWlscyI6eyJ0byI6IjB4NEQwNzA0ZjQwMEQ1N0JhOTNlRWE4ODc2NUMzRmNEQkQ4MjZkQ0ZjNCIsInJlcXVlc3RlZEFtb3VudCI6IjQ0ODg0MDAwMDAwMDAwMDAwMDAwIn0sIm93bmVyIjoiMHhkOTUzMEYzZmJCRWExMWJlRDAxREMwOUU3OTMxOGYyZjIwMjIzNzE2Iiwic2lnbmF0dXJlIjoiMHhjNTk3ZTFjZGUxNjdlZTUxOTBmMThiOTMyZTlkNzdjYjZkM2ZhNDlmZTA5ZWFmMTk5MGZkODZkODkzOTA5NDVmMGFmNGYxYzI4YzNlNjI3OWE1YTQ0N2M1Y2M4NTk5OTFlNDFjOWRkNzhiYzBlZTlhMWI3ZWY0M2YxYjQxNzA2ZTFiIiwibmV0d29ya0lkIjoxMDB9XQ==", + "evaluationCommentHtml": "

[ 42.914 WXDAI ]

@0x4007
Contributions Overview
View Contribution Count Reward
Issue Task 0.5 25
Issue Specification 1 2.73
Issue Comment 2 3.544
Review Comment 3 11.64
Conversation Incentives
Comment Formatting Relevance Reward
Looks like the filters are barely useable now that we have the s…
2.73
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 49
        multiplier: 0.1
    score: 1
  img:
    symbols:
      \\b\\w+\\b:
        count: 1
        multiplier: 0.1
    score: 0
multiplier: 1
1 2.73
Okay both bots are broken @gentlementlegen We should have spli…
1.77
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 13
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 1.416
Actually, looks like it did the right thing for your reward on v…
2.66
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 21
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 2.128
Resolves https://github.com/ubiquity/work.ubq.fi/issues/69
0
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 10
        multiplier: 0
    score: 1
multiplier: 0
0.8 -
I always struggle with Cypress
1.57
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 5
        multiplier: 0.2
    score: 1
multiplier: 2
1 1.57
Only doesn't work on my local, the guess is token expiration aft…
10.07
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 29
        multiplier: 0.2
    score: 1
  a:
    symbols:
      \\b\\w+\\b:
        count: 11
        multiplier: 0.2
    score: 1
multiplier: 2
1 10.07
", + "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiI0MjkxNDAwMDAwMDAwMDAwMDAwMCJ9LCJub25jZSI6IjMzOTI5NDE3NjI3OTM5NzU1OTMxNzgxMTE1NjU5ODM3OTc0NzU4OTQwMzc0OTU0MDQxMzEyODYzODI3ODA0MTE2ODc3MDgzNTI4ODgiLCJkZWFkbGluZSI6IjU3ODk2MDQ0NjE4NjU4MDk3NzExNzg1NDkyNTA0MzQzOTUzOTI2NjM0OTkyMzMyODIwMjgyMDE5NzI4NzkyMDAzOTU2NTY0ODE5OTY3In0sInRyYW5zZmVyRGV0YWlscyI6eyJ0byI6IjB4NEQwNzA0ZjQwMEQ1N0JhOTNlRWE4ODc2NUMzRmNEQkQ4MjZkQ0ZjNCIsInJlcXVlc3RlZEFtb3VudCI6IjQyOTE0MDAwMDAwMDAwMDAwMDAwIn0sIm93bmVyIjoiMHhkOTUzMEYzZmJCRWExMWJlRDAxREMwOUU3OTMxOGYyZjIwMjIzNzE2Iiwic2lnbmF0dXJlIjoiMHhiZTk2MzcyODc5ZGRhYjcxOTMwZTliNjk0ZjkxYzBlZDE5Mzk3Y2QzYmNlNzU2Njg1YzkwOWU2MDE0ZWEwZmU2MjZkYmZiNDM5MTlmZmVlM2M0MWNlMDE1ZTQwZTZmOWUwNmQ3NTZkMTU1NjIwYWZjYjM1MGRlZmM1NGRjOGM1MTFjIiwibmV0d29ya0lkIjoxMDB9XQ==", "task": { "multiplier": 0.5, "reward": 25 }, - "total": 44.884, + "total": 42.914, "userId": 4975670 }, "gentlementlegen": { @@ -236,7 +218,7 @@ "score": 1, "symbols": { "\\b\\w+\\b": { - "count": 18, + "count": 16, "multiplier": 0.1 } } @@ -245,7 +227,7 @@ "multiplier": 1 }, "relevance": 0.8, - "reward": 1.08 + "reward": 0.992 }, "type": "ISSUE_COLLABORATOR", "url": "https://github.com/ubiquity/work.ubq.fi/issues/69#issuecomment-2186813200" @@ -275,13 +257,13 @@ "url": "https://github.com/ubiquity/work.ubq.fi/pull/70#issuecomment-2186914050" } ], - "evaluationCommentHtml": "

[ 29.562 WXDAI ]

@gentlementlegen
Contributions Overview
View Contribution Count Reward
Issue Task 0.5 25
Issue Comment 2 2.312
Review Comment 1 2.25
Conversation Incentives
Comment Formatting Relevance Reward
@0x4007 So it should be 25 each? I can confirm this is not handl…
1.54
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 25
        multiplier: 0.1
    score: 1
multiplier: 1
0.8 1.232
Ah yes because it doesn't apply the `0.5` multiplier I s…
1.35
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 18
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \\b\\w+\\b:
        count: 2
        multiplier: 0.1
    score: 1
multiplier: 1
0.8 1.08
After token expiration, I could not reproduce the problem and st…
2.25
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 39
        multiplier: 0.1
    score: 1
multiplier: 1
1 2.25
", - "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiIyOTU2MjAwMDAwMDAwMDAwMDAwMCJ9LCJub25jZSI6IjgzMDc2NDM3NDQ2NDk5NTg5MzA0NjExMTI4OTYzOTE2NzEwMTA2ODg2MTAyNDM2MDIzODgxNTIwMDU4MzQ2ODAwNTc4NzU0NDAxNzU1IiwiZGVhZGxpbmUiOiI1Nzg5NjA0NDYxODY1ODA5NzcxMTc4NTQ5MjUwNDM0Mzk1MzkyNjYzNDk5MjMzMjgyMDI4MjAxOTcyODc5MjAwMzk1NjU2NDgxOTk2NyJ9LCJ0cmFuc2ZlckRldGFpbHMiOnsidG8iOiIweDREMDcwNGY0MDBENTdCYTkzZUVhODg3NjVDM0ZjREJEODI2ZENGYzQiLCJyZXF1ZXN0ZWRBbW91bnQiOiIyOTU2MjAwMDAwMDAwMDAwMDAwMCJ9LCJvd25lciI6IjB4ZDk1MzBGM2ZiQkVhMTFiZUQwMURDMDlFNzkzMThmMmYyMDIyMzcxNiIsInNpZ25hdHVyZSI6IjB4Y2FmMmM3NmFiN2ZjOTgzZmJjZWE1YTRjMzNkM2I4NGM3NDA5Mzc4ODRjOTAwNzc2YzE2NDNkZmNhMWU4ZWY5ZTFlMTViMGU2MWI5OGIwNzRkMTBkODMyNDAyZGZmMTlkZDMzNmZkNzE1YTA5NmE1NDZhOTYzNGEyMTUxN2I4YWQxYyIsIm5ldHdvcmtJZCI6MTAwfV0=", + "evaluationCommentHtml": "

[ 29.474 WXDAI ]

@gentlementlegen
Contributions Overview
View Contribution Count Reward
Issue Task 0.5 25
Issue Comment 2 2.224
Review Comment 1 2.25
Conversation Incentives
Comment Formatting Relevance Reward
@0x4007 So it should be 25 each? I can confirm this is not handl…
1.54
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 25
        multiplier: 0.1
    score: 1
multiplier: 1
0.8 1.232
Ah yes because it doesn't apply the `0.5` multiplier I s…
1.24
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 16
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \\b\\w+\\b:
        count: 2
        multiplier: 0.1
    score: 1
multiplier: 1
0.8 0.992
After token expiration, I could not reproduce the problem and st…
2.25
content:
  p:
    symbols:
      \\b\\w+\\b:
        count: 39
        multiplier: 0.1
    score: 1
multiplier: 1
1 2.25
", + "permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiIyOTQ3NDAwMDAwMDAwMDAwMDAwMCJ9LCJub25jZSI6IjgzMDc2NDM3NDQ2NDk5NTg5MzA0NjExMTI4OTYzOTE2NzEwMTA2ODg2MTAyNDM2MDIzODgxNTIwMDU4MzQ2ODAwNTc4NzU0NDAxNzU1IiwiZGVhZGxpbmUiOiI1Nzg5NjA0NDYxODY1ODA5NzcxMTc4NTQ5MjUwNDM0Mzk1MzkyNjYzNDk5MjMzMjgyMDI4MjAxOTcyODc5MjAwMzk1NjU2NDgxOTk2NyJ9LCJ0cmFuc2ZlckRldGFpbHMiOnsidG8iOiIweDREMDcwNGY0MDBENTdCYTkzZUVhODg3NjVDM0ZjREJEODI2ZENGYzQiLCJyZXF1ZXN0ZWRBbW91bnQiOiIyOTQ3NDAwMDAwMDAwMDAwMDAwMCJ9LCJvd25lciI6IjB4ZDk1MzBGM2ZiQkVhMTFiZUQwMURDMDlFNzkzMThmMmYyMDIyMzcxNiIsInNpZ25hdHVyZSI6IjB4MmI3YjE0ODU0NmMyMDNlNDkyNGFlNmJjZjdmMDBhYzZiZDA5NjJjNjNlOWYzZmFlMGZmZWZjNmZlNDYyNTc4MzU3ZGU1MjgxOTk1Mzg5NTYyMWNjZTU4MDYwNDc2NjNmZGEwNDU1NDU4ZGVmNDk0NTc4NTA3YmM5OTAzNGVkMDYxYyIsIm5ldHdvcmtJZCI6MTAwfV0=", "task": { "multiplier": 0.5, "reward": 25 }, - "total": 29.562, + "total": 29.474, "userId": 9807008 } } diff --git a/tests/__mocks__/results/valid-configuration.json b/tests/__mocks__/results/valid-configuration.json index d239a8a6..21392152 100644 --- a/tests/__mocks__/results/valid-configuration.json +++ b/tests/__mocks__/results/valid-configuration.json @@ -11,23 +11,33 @@ "multipliers": [ { "relevance": 1, - "role": ["ISSUE_SPECIFICATION"] + "role": [ + "ISSUE_SPECIFICATION" + ] }, { "relevance": 1, - "role": ["PULL_AUTHOR"] + "role": [ + "PULL_AUTHOR" + ] }, { "relevance": 1, - "role": ["PULL_ASSIGNEE"] + "role": [ + "PULL_ASSIGNEE" + ] }, { "relevance": 1, - "role": ["PULL_COLLABORATOR"] + "role": [ + "PULL_COLLABORATOR" + ] }, { "relevance": 1, - "role": ["PULL_CONTRIBUTOR"] + "role": [ + "PULL_CONTRIBUTOR" + ] } ], "openAi": { @@ -66,7 +76,9 @@ "\\b\\w+\\b": 0.1 } }, - "role": ["ISSUE_SPECIFICATION"] + "role": [ + "ISSUE_SPECIFICATION" + ] }, { "multiplier": 1, @@ -96,7 +108,9 @@ "\\b\\w+\\b": 0.2 } }, - "role": ["ISSUE_AUTHOR"] + "role": [ + "ISSUE_AUTHOR" + ] }, { "multiplier": 0, @@ -126,7 +140,9 @@ "\\b\\w+\\b": 0 } }, - "role": ["ISSUE_ASSIGNEE"] + "role": [ + "ISSUE_ASSIGNEE" + ] }, { "multiplier": 1, @@ -156,7 +172,9 @@ "\\b\\w+\\b": 0.1 } }, - "role": ["ISSUE_COLLABORATOR"] + "role": [ + "ISSUE_COLLABORATOR" + ] }, { "multiplier": 0.25, @@ -186,7 +204,9 @@ "\\b\\w+\\b": 0.1 } }, - "role": ["ISSUE_CONTRIBUTOR"] + "role": [ + "ISSUE_CONTRIBUTOR" + ] }, { "multiplier": 0, @@ -216,7 +236,9 @@ "\\b\\w+\\b": 0 } }, - "role": ["PULL_SPECIFICATION"] + "role": [ + "PULL_SPECIFICATION" + ] }, { "multiplier": 2, @@ -246,7 +268,9 @@ "\\b\\w+\\b": 0.2 } }, - "role": ["PULL_AUTHOR"] + "role": [ + "PULL_AUTHOR" + ] }, { "multiplier": 1, @@ -276,7 +300,9 @@ "\\b\\w+\\b": 0.1 } }, - "role": ["PULL_ASSIGNEE"] + "role": [ + "PULL_ASSIGNEE" + ] }, { "multiplier": 1, @@ -306,7 +332,9 @@ "\\b\\w+\\b": 0.1 } }, - "role": ["PULL_COLLABORATOR"] + "role": [ + "PULL_COLLABORATOR" + ] }, { "multiplier": 0.25, @@ -336,7 +364,9 @@ "\\b\\w+\\b": 0.1 } }, - "role": ["PULL_CONTRIBUTOR"] + "role": [ + "PULL_CONTRIBUTOR" + ] } ], "wordCountExponent": 0.85 @@ -350,5 +380,6 @@ "userExtractor": { "redeemTask": true } - } + }, + "logLevel": "info" }