From b0944d4936c7b7e453c87598b9e15b8568f2d03f Mon Sep 17 00:00:00 2001 From: me505 <62057938+me505@users.noreply.github.com> Date: Fri, 15 Sep 2023 03:51:00 +0000 Subject: [PATCH 1/9] chore: t --- .github/ubiquibot-config.yml | 41 +++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/.github/ubiquibot-config.yml b/.github/ubiquibot-config.yml index 336f1f1a4..1ec27f102 100644 --- a/.github/ubiquibot-config.yml +++ b/.github/ubiquibot-config.yml @@ -1 +1,40 @@ -price-multiplier: 1.5 \ No newline at end of file +--- +evm-network-id: 100 +price-multiplier: 1.5 +time-labels: + - name: "Time: <1 Hour" + - name: "Time: <1 Day" + - name: "Time: <1 Week" + - name: "Time: <2 Weeks" + - name: "Time: <1 Month" +priority-labels: + - name: "Priority: 0 (Normal)" + - name: "Priority: 1 (Medium)" + - name: "Priority: 2 (High)" + - name: "Priority: 3 (Urgent)" + - name: "Priority: 4 (Emergency)" +default-labels: + - "Time: <1 Hour" + - "Priority: 1 (Normal)" +payment-permit-max-price: 1000 +comment-incentives: true +promotion-comment: "
If you've enjoyed your experience in the DevPool, we'd appreciate your support. Follow Ubiquity on GitHub and star this repo. Your endorsement means the world to us and helps us grow!
We are excited to announce that the DevPool and UbiquiBot are now available to partners! Our ideal collaborators are globally distributed crypto-native organizations, who actively work on open source on GitHub, and excel in research & development. If you can introduce us to the repository maintainers in these types of companies, we have a special bonus in store for you!
" +register-wallet-with-verification: false +command-settings: + - name: start + enabled: true + - name: stop + enabled: true + - name: wallet + enabled: true + - name: payout + enabled: true + - name: multiplier + enabled: true + - name: query + enabled: true + - name: allow + enabled: true + - name: autopay + enabled: true +private-key-encrypted: "OluXPVOgAhbeLc9i9NQjXXAKra9iVn9noGUjoBNcLluGVxD32BEKl4UglCBFUpE3Ve2uCApgZdMPsKwqVHa2vcmEJQaWjnxy6jx7jQXC9QEJ6YdL" \ No newline at end of file From 1efcc22ea69fcc903eb8d0139d6089aec4c4a6d3 Mon Sep 17 00:00:00 2001 From: me505 <62057938+me505@users.noreply.github.com> Date: Fri, 15 Sep 2023 04:19:31 +0000 Subject: [PATCH 2/9] chore: t --- .github/ubiquibot-config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ubiquibot-config.yml b/.github/ubiquibot-config.yml index 1ec27f102..bb40dd88d 100644 --- a/.github/ubiquibot-config.yml +++ b/.github/ubiquibot-config.yml @@ -1,6 +1,7 @@ --- evm-network-id: 100 price-multiplier: 1.5 +assistive-pricing: true time-labels: - name: "Time: <1 Hour" - name: "Time: <1 Day" From 390fc255bfae57ca08fc62300f8a5d7c41179d43 Mon Sep 17 00:00:00 2001 From: me505 <62057938+me505@users.noreply.github.com> Date: Fri, 15 Sep 2023 04:50:02 +0000 Subject: [PATCH 3/9] chore: t --- .github/ubiquibot-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ubiquibot-config.yml b/.github/ubiquibot-config.yml index bb40dd88d..3455146a3 100644 --- a/.github/ubiquibot-config.yml +++ b/.github/ubiquibot-config.yml @@ -38,4 +38,4 @@ command-settings: enabled: true - name: autopay enabled: true -private-key-encrypted: "OluXPVOgAhbeLc9i9NQjXXAKra9iVn9noGUjoBNcLluGVxD32BEKl4UglCBFUpE3Ve2uCApgZdMPsKwqVHa2vcmEJQaWjnxy6jx7jQXC9QEJ6YdL" \ No newline at end of file +private-key-encrypted: "5Awi3hP6k78nINwmjadju8SJPZ1SeHBOhoaNYjdRm2_1VAF3OlzVVIv6iFrZ2CqsJ-R2h9clb4CyXRhK7kRXucrev2sfalqRa33El_LiSQFlZBQ4WwYtk22np1BOUeDQLwW3dx8mse_05c3b1rMTQA" \ No newline at end of file From d3e8230e99340e8add1fb7933a69dcbafb3e79d3 Mon Sep 17 00:00:00 2001 From: me505 <62057938+me505@users.noreply.github.com> Date: Tue, 19 Sep 2023 10:03:44 +0000 Subject: [PATCH 4/9] feat: selectivly enable incentives --- src/handlers/payout/post.ts | 47 ++++++++++++++++++++----------------- src/helpers/issue.ts | 16 +++++++++++++ 2 files changed, 42 insertions(+), 21 deletions(-) diff --git a/src/handlers/payout/post.ts b/src/handlers/payout/post.ts index e43f9d4c5..fd29be959 100644 --- a/src/handlers/payout/post.ts +++ b/src/handlers/payout/post.ts @@ -5,6 +5,7 @@ import { generatePermit2Signature, getAllIssueComments, getAllPullRequestReviews, + getIncentivizedUsers, getIssueDescription, getTokenSymbol, parseComments, @@ -70,13 +71,13 @@ export const incentivizeComments = async () => { logger.info("incentivizeComments: skipping payment permit generation because `assignee` is `undefined`."); return; } - + const users = await getIncentivizedUsers(issue.number); const issueComments = await getAllIssueComments(issue.number, "full"); logger.info(`Getting the issue comments done. comments: ${JSON.stringify(issueComments)}`); const issueCommentsByUser: Record = {}; for (const issueComment of issueComments) { const user = issueComment.user; - if (user.type == UserType.Bot || user.login == assignee) continue; + if (user.type == UserType.Bot) continue; const commands = commentParser(issueComment.body); if (commands.length > 0) { logger.info(`Skipping to parse the comment because it contains commands. comment: ${JSON.stringify(issueComment)}`); @@ -103,26 +104,30 @@ export const incentivizeComments = async () => { const fallbackReward: Record = {}; let comment = `#### Conversation Rewards\n`; for (const user of Object.keys(issueCommentsByUser)) { - const commentsByUser = issueCommentsByUser[user]; - const commentsByNode = await parseComments(commentsByUser.comments, ItemsToExclude); - const rewardValue = calculateRewardValue(commentsByNode, incentives); - if (rewardValue.equals(0)) { - logger.info(`Skipping to generate a permit url because the reward value is 0. user: ${user}`); - continue; - } - logger.debug(`Comment parsed for the user: ${user}. comments: ${JSON.stringify(commentsByNode)}, sum: ${rewardValue}`); - const account = await getWalletAddress(user); - const amountInETH = rewardValue.mul(baseMultiplier); - if (amountInETH.gt(paymentPermitMaxPrice)) { - logger.info(`Skipping comment reward for user ${user} because reward is higher than payment permit max price`); - continue; - } - if (account) { - const { payoutUrl } = await generatePermit2Signature(account, amountInETH, issue.node_id, commentsByUser.id, "ISSUE_COMMENTER"); - comment = `${comment}### [ **${user}: [ CLAIM ${amountInETH} ${tokenSymbol.toUpperCase()} ]** ](${payoutUrl})\n`; - reward[user] = payoutUrl; + if (users.users.includes(user) || users.enable) { + const commentsByUser = issueCommentsByUser[user]; + const commentsByNode = await parseComments(commentsByUser.comments, ItemsToExclude); + const rewardValue = calculateRewardValue(commentsByNode, incentives); + if (rewardValue.equals(0)) { + logger.info(`Skipping to generate a permit url because the reward value is 0. user: ${user}`); + continue; + } + logger.debug(`Comment parsed for the user: ${user}. comments: ${JSON.stringify(commentsByNode)}, sum: ${rewardValue}`); + const account = await getWalletAddress(user); + const amountInETH = rewardValue.mul(baseMultiplier); + if (amountInETH.gt(paymentPermitMaxPrice)) { + logger.info(`Skipping comment reward for user ${user} because reward is higher than payment permit max price`); + continue; + } + if (account) { + const { payoutUrl } = await generatePermit2Signature(account, amountInETH, issue.node_id, commentsByUser.id, "ISSUE_COMMENTER"); + comment = `${comment}### [ **${user}: [ CLAIM ${amountInETH} ${tokenSymbol.toUpperCase()} ]** ](${payoutUrl})\n`; + reward[user] = payoutUrl; + } else { + fallbackReward[user] = amountInETH; + } } else { - fallbackReward[user] = amountInETH; + continue; } } diff --git a/src/helpers/issue.ts b/src/helpers/issue.ts index b8b487f35..0937d85bb 100644 --- a/src/helpers/issue.ts +++ b/src/helpers/issue.ts @@ -95,6 +95,22 @@ export const listAllIssuesForRepo = async (state: "open" | "closed" | "all" = "o return issuesArr; }; +export const getIncentivizedUsers = async (issue_number: number) => { + const comments = await getAllIssueComments(issue_number); + const incentiveComment = comments.filter((comment) => comment.body.startsWith("/comment-incentives")); + const parts = incentiveComment[0].body.split(""); + parts.shift(); + let users: { enable: boolean; users: string[] } = { enable: false, users: [] }; + for (const part of parts) { + if (part.startsWith("@")) { + users.users.push(part.substring(1)); + } else if (part == "true") { + users.enable = part == "true"; + } + } + return users; +}; + export const addCommentToIssue = async (msg: string, issue_number: number) => { const context = getBotContext(); const logger = getLogger(); From a428f89631a99cc36bb26a55377b83c1edb7aa1e Mon Sep 17 00:00:00 2001 From: me505 <62057938+me505@users.noreply.github.com> Date: Tue, 19 Sep 2023 10:06:49 +0000 Subject: [PATCH 5/9] feat: selectivly enable incentives --- src/handlers/payout/post.ts | 3 +-- src/helpers/issue.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/handlers/payout/post.ts b/src/handlers/payout/post.ts index fd29be959..87caca09e 100644 --- a/src/handlers/payout/post.ts +++ b/src/handlers/payout/post.ts @@ -71,7 +71,6 @@ export const incentivizeComments = async () => { logger.info("incentivizeComments: skipping payment permit generation because `assignee` is `undefined`."); return; } - const users = await getIncentivizedUsers(issue.number); const issueComments = await getAllIssueComments(issue.number, "full"); logger.info(`Getting the issue comments done. comments: ${JSON.stringify(issueComments)}`); const issueCommentsByUser: Record = {}; @@ -99,7 +98,7 @@ export const incentivizeComments = async () => { // The mapping between gh handle and comment with a permit url const reward: Record = {}; - + const users = await getIncentivizedUsers(issue.number); // The mapping between gh handle and amount in ETH const fallbackReward: Record = {}; let comment = `#### Conversation Rewards\n`; diff --git a/src/helpers/issue.ts b/src/helpers/issue.ts index 0937d85bb..ea1b70f8a 100644 --- a/src/helpers/issue.ts +++ b/src/helpers/issue.ts @@ -100,7 +100,7 @@ export const getIncentivizedUsers = async (issue_number: number) => { const incentiveComment = comments.filter((comment) => comment.body.startsWith("/comment-incentives")); const parts = incentiveComment[0].body.split(""); parts.shift(); - let users: { enable: boolean; users: string[] } = { enable: false, users: [] }; + const users: { enable: boolean; users: string[] } = { enable: false, users: [] }; for (const part of parts) { if (part.startsWith("@")) { users.users.push(part.substring(1)); From 66b1296ba8c6e39840b8d18037781931eff947e0 Mon Sep 17 00:00:00 2001 From: me505 <62057938+me505@users.noreply.github.com> Date: Thu, 21 Sep 2023 09:47:41 +0000 Subject: [PATCH 6/9] feat: selectivly enable incentives --- src/handlers/payout/post.ts | 2 -- src/helpers/issue.ts | 9 ++++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/handlers/payout/post.ts b/src/handlers/payout/post.ts index 87caca09e..acb4a2aa7 100644 --- a/src/handlers/payout/post.ts +++ b/src/handlers/payout/post.ts @@ -125,8 +125,6 @@ export const incentivizeComments = async () => { } else { fallbackReward[user] = amountInETH; } - } else { - continue; } } diff --git a/src/helpers/issue.ts b/src/helpers/issue.ts index ea1b70f8a..4ff73e1ee 100644 --- a/src/helpers/issue.ts +++ b/src/helpers/issue.ts @@ -98,14 +98,17 @@ export const listAllIssuesForRepo = async (state: "open" | "closed" | "all" = "o export const getIncentivizedUsers = async (issue_number: number) => { const comments = await getAllIssueComments(issue_number); const incentiveComment = comments.filter((comment) => comment.body.startsWith("/comment-incentives")); - const parts = incentiveComment[0].body.split(""); + const parts = incentiveComment[0].body.split(" "); parts.shift(); const users: { enable: boolean; users: string[] } = { enable: false, users: [] }; for (const part of parts) { if (part.startsWith("@")) { users.users.push(part.substring(1)); - } else if (part == "true") { - users.enable = part == "true"; + } + if (part == "true") { + users.enable = true; + } else { + users.enable = false; } } return users; From 922e827e603032d6f744f6cc086456e751683e7c Mon Sep 17 00:00:00 2001 From: me505 <62057938+me505@users.noreply.github.com> Date: Thu, 21 Sep 2023 09:49:07 +0000 Subject: [PATCH 7/9] feat: selectivly enable incentives --- .github/ubiquibot-config.yml | 42 +----------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/.github/ubiquibot-config.yml b/.github/ubiquibot-config.yml index 3455146a3..336f1f1a4 100644 --- a/.github/ubiquibot-config.yml +++ b/.github/ubiquibot-config.yml @@ -1,41 +1 @@ ---- -evm-network-id: 100 -price-multiplier: 1.5 -assistive-pricing: true -time-labels: - - name: "Time: <1 Hour" - - name: "Time: <1 Day" - - name: "Time: <1 Week" - - name: "Time: <2 Weeks" - - name: "Time: <1 Month" -priority-labels: - - name: "Priority: 0 (Normal)" - - name: "Priority: 1 (Medium)" - - name: "Priority: 2 (High)" - - name: "Priority: 3 (Urgent)" - - name: "Priority: 4 (Emergency)" -default-labels: - - "Time: <1 Hour" - - "Priority: 1 (Normal)" -payment-permit-max-price: 1000 -comment-incentives: true -promotion-comment: "
If you've enjoyed your experience in the DevPool, we'd appreciate your support. Follow Ubiquity on GitHub and star this repo. Your endorsement means the world to us and helps us grow!
We are excited to announce that the DevPool and UbiquiBot are now available to partners! Our ideal collaborators are globally distributed crypto-native organizations, who actively work on open source on GitHub, and excel in research & development. If you can introduce us to the repository maintainers in these types of companies, we have a special bonus in store for you!
" -register-wallet-with-verification: false -command-settings: - - name: start - enabled: true - - name: stop - enabled: true - - name: wallet - enabled: true - - name: payout - enabled: true - - name: multiplier - enabled: true - - name: query - enabled: true - - name: allow - enabled: true - - name: autopay - enabled: true -private-key-encrypted: "5Awi3hP6k78nINwmjadju8SJPZ1SeHBOhoaNYjdRm2_1VAF3OlzVVIv6iFrZ2CqsJ-R2h9clb4CyXRhK7kRXucrev2sfalqRa33El_LiSQFlZBQ4WwYtk22np1BOUeDQLwW3dx8mse_05c3b1rMTQA" \ No newline at end of file +price-multiplier: 1.5 \ No newline at end of file From dc2a54707fde2ef23a1854bc36b21aa089949f54 Mon Sep 17 00:00:00 2001 From: me505 <62057938+me505@users.noreply.github.com> Date: Sun, 24 Sep 2023 08:12:07 +0000 Subject: [PATCH 8/9] feat: selectivly enable incentives --- src/configs/ubiquibot-config-default.ts | 90 ++++++++++--------- src/handlers/comment/commands.ts | 1 + .../comment/handlers/comment-incentives.ts | 23 +++++ src/handlers/comment/handlers/index.ts | 8 ++ src/handlers/payout/post.ts | 3 +- src/helpers/issue.ts | 31 ++++--- 6 files changed, 101 insertions(+), 55 deletions(-) create mode 100644 src/handlers/comment/handlers/comment-incentives.ts diff --git a/src/configs/ubiquibot-config-default.ts b/src/configs/ubiquibot-config-default.ts index d1d9b7ffd..48f0dd552 100644 --- a/src/configs/ubiquibot-config-default.ts +++ b/src/configs/ubiquibot-config-default.ts @@ -1,6 +1,6 @@ import { MergedConfig } from "../types"; -export const DefaultConfig : MergedConfig = { +export const DefaultConfig: MergedConfig = { "evm-network-id": 100, "price-multiplier": 1, "issue-creator-multiplier": 2, @@ -10,88 +10,92 @@ export const DefaultConfig : MergedConfig = { "disable-analytics": false, "comment-incentives": false, "register-wallet-with-verification": false, - "promotion-comment": "\n
If you enjoy the DevPool experience, please follow Ubiquity on GitHub and star this repo to show your support. It helps a lot!
", + "promotion-comment": + "\n
If you enjoy the DevPool experience, please follow Ubiquity on GitHub and star this repo to show your support. It helps a lot!
", "default-labels": [], "time-labels": [ { - "name": "Time: <1 Hour" + name: "Time: <1 Hour", }, { - "name": "Time: <1 Day" + name: "Time: <1 Day", }, { - "name": "Time: <1 Week" + name: "Time: <1 Week", }, { - "name": "Time: <2 Weeks" + name: "Time: <2 Weeks", }, { - "name": "Time: <1 Month" - } + name: "Time: <1 Month", + }, ], "priority-labels": [ { - "name": "Priority: 1 (Normal)" + name: "Priority: 1 (Normal)", }, { - "name": "Priority: 2 (Medium)" + name: "Priority: 2 (Medium)", }, { - "name": "Priority: 3 (High)" + name: "Priority: 3 (High)", }, { - "name": "Priority: 4 (Urgent)" + name: "Priority: 4 (Urgent)", }, { - "name": "Priority: 5 (Emergency)" - } + name: "Priority: 5 (Emergency)", + }, ], "command-settings": [ { - "name": "start", - "enabled": false + name: "start", + enabled: false, + }, + { + name: "stop", + enabled: false, }, { - "name": "stop", - "enabled": false + name: "wallet", + enabled: false, }, { - "name": "wallet", - "enabled": false + name: "payout", + enabled: false, }, { - "name": "payout", - "enabled": false + name: "multiplier", + enabled: false, }, { - "name": "multiplier", - "enabled": false + name: "query", + enabled: false, }, { - "name": "query", - "enabled": false + name: "comment-incentive", + enabled: false, }, { - "name": "allow", - "enabled": false + name: "allow", + enabled: false, }, { - "name": "autopay", - "enabled": false - } + name: "autopay", + enabled: false, + }, ], - "incentives": { - "comment": { - "elements": {}, - "totals": { - "word": 0 - } - } + incentives: { + comment: { + elements: {}, + totals: { + word: 0, + }, + }, }, "enable-access-control": { - "label": false, - "organization": true + label: false, + organization: true, }, - "stale-bounty-time":"0d" -} - + "stale-bounty-time": "0d", +}; diff --git a/src/handlers/comment/commands.ts b/src/handlers/comment/commands.ts index afdab0b03..de6fd4858 100644 --- a/src/handlers/comment/commands.ts +++ b/src/handlers/comment/commands.ts @@ -6,6 +6,7 @@ export enum IssueCommentCommands { PAYOUT = "/payout", // request permit payout MULTIPLIER = "/multiplier", // set bounty multiplier (for treasury) QUERY = "/query", + COMMENTINCENTIVE = "/comment-incentive", // Access Controls ALLOW = "/allow", diff --git a/src/handlers/comment/handlers/comment-incentives.ts b/src/handlers/comment/handlers/comment-incentives.ts new file mode 100644 index 000000000..5a2cf6496 --- /dev/null +++ b/src/handlers/comment/handlers/comment-incentives.ts @@ -0,0 +1,23 @@ +import { getBotContext, getLogger } from "../../../bindings"; +import { Payload } from "../../../types"; + +export const commentIncentive = async (body: string) => { + const context = getBotContext(); + const logger = getLogger(); + const payload = context.payload as Payload; + const sender = payload.sender.login; + + logger.info(`Received '/comment-incentive' command from user: ${sender}`); + + if (!payload.issue) { + logger.info(`Skipping '/comment-incentive' because of no issue instance`); + return `Skipping '/comment-incentive' because of no issue instance`; + } + const parts = body.split(" "); + parts.shift(); + if (parts.pop() !== "true" && parts.pop() !== "false") { + return `invalid syntax for /comment-incentive \n usage /comment-incentive @user @user1... true|false \n ex /comment-incentive @user true`; + } else { + return; + } +}; diff --git a/src/handlers/comment/handlers/index.ts b/src/handlers/comment/handlers/index.ts index b8dfe8534..73d2ba802 100644 --- a/src/handlers/comment/handlers/index.ts +++ b/src/handlers/comment/handlers/index.ts @@ -28,6 +28,7 @@ import { query } from "./query"; import { autoPay } from "./payout"; import { getTargetPriceLabel } from "../../shared"; import { ErrorDiff } from "../../../utils/helpers"; +import { commentIncentive } from "./comment-incentives"; export * from "./assign"; export * from "./wallet"; @@ -36,6 +37,7 @@ export * from "./payout"; export * from "./help"; export * from "./multiplier"; export * from "./query"; +export * from "./comment-incentives"; /** * Parses the comment body and figure out the command name a user wants @@ -245,6 +247,12 @@ export const userCommands = (): UserCommands[] => { handler: autoPay, callback: commandCallback, }, + { + id: IssueCommentCommands.COMMENTINCENTIVE, + description: `Enabled or disables comment incentives for a user`, + handler: commentIncentive, + callback: commandCallback, + }, { id: IssueCommentCommands.QUERY, description: `Comments the users multiplier and address`, diff --git a/src/handlers/payout/post.ts b/src/handlers/payout/post.ts index acb4a2aa7..75da26ff2 100644 --- a/src/handlers/payout/post.ts +++ b/src/handlers/payout/post.ts @@ -99,11 +99,12 @@ export const incentivizeComments = async () => { // The mapping between gh handle and comment with a permit url const reward: Record = {}; const users = await getIncentivizedUsers(issue.number); + if (!users) return; // The mapping between gh handle and amount in ETH const fallbackReward: Record = {}; let comment = `#### Conversation Rewards\n`; for (const user of Object.keys(issueCommentsByUser)) { - if (users.users.includes(user) || users.enable) { + if (users[user] || users[user] == true) { const commentsByUser = issueCommentsByUser[user]; const commentsByNode = await parseComments(commentsByUser.comments, ItemsToExclude); const rewardValue = calculateRewardValue(commentsByNode, incentives); diff --git a/src/helpers/issue.ts b/src/helpers/issue.ts index 4ff73e1ee..753627a38 100644 --- a/src/helpers/issue.ts +++ b/src/helpers/issue.ts @@ -97,20 +97,29 @@ export const listAllIssuesForRepo = async (state: "open" | "closed" | "all" = "o export const getIncentivizedUsers = async (issue_number: number) => { const comments = await getAllIssueComments(issue_number); - const incentiveComment = comments.filter((comment) => comment.body.startsWith("/comment-incentives")); - const parts = incentiveComment[0].body.split(" "); - parts.shift(); - const users: { enable: boolean; users: string[] } = { enable: false, users: [] }; - for (const part of parts) { - if (part.startsWith("@")) { - users.users.push(part.substring(1)); - } - if (part == "true") { - users.enable = true; + const incentiveComments = comments.filter((comment) => comment.body.startsWith("/comment-incentives")); + let users: { [key: string]: boolean } = {}; + for (const incentiveComment of incentiveComments) { + const parts = incentiveComment.body.split(" "); + parts.shift(); + if (parts.pop() == "true") { + for (const part of parts) { + if (part.startsWith("@")) { + users[part.substring(1)] = true; + } + } + } else if (parts.pop() == "false") { + for (const part of parts) { + if (part.startsWith("@")) { + users[part.substring(1)] = true; + } + } } else { - users.enable = false; + return undefined; } + return users; } + return users; }; From e8c8f7c108d3a722518b31855c966e09ce864496 Mon Sep 17 00:00:00 2001 From: me505 <62057938+me505@users.noreply.github.com> Date: Sun, 24 Sep 2023 08:13:26 +0000 Subject: [PATCH 9/9] feat: selectivly enable incentives --- src/helpers/issue.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/helpers/issue.ts b/src/helpers/issue.ts index 753627a38..a6f541db3 100644 --- a/src/helpers/issue.ts +++ b/src/helpers/issue.ts @@ -117,9 +117,7 @@ export const getIncentivizedUsers = async (issue_number: number) => { } else { return undefined; } - return users; } - return users; };