Skip to content

Commit

Permalink
feat: remove restriction where issue creator will not get reward if t…
Browse files Browse the repository at this point in the history
…hey were also the assignee
  • Loading branch information
whilefoo committed Sep 24, 2023
1 parent 660e205 commit 8542538
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/handlers/payout/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ export const calculateIssueCreatorReward = async (incentivesCalculation: Incenti

const description = await getIssueDescription(incentivesCalculation.issue.number, "html");
if (!description) {
logger.info(`Skipping to generate a permit url because issue description is empty. description: ${description}`);
return { error: `Skipping to generate a permit url because issue description is empty. description: ${description}` };
logger.info(`Skipping issue creator reward because issue description is empty. description: ${description}`);
return { error: `Skipping issue creator reward because issue description is empty. description: ${description}` };
}
logger.info(`Getting the issue description done. description: ${description}`);
const creator = incentivesCalculation.issue.user;
if (creator.type === UserType.Bot || creator.login === incentivesCalculation.issue.assignee) {
logger.info("Issue creator assigneed himself or Bot created this issue.");
return { error: "Issue creator assigneed himself or Bot created this issue." };
if (creator.type === UserType.Bot) {
logger.info("Skipping issue creator reward because Bot created this issue.");
return { error: "Skipping issue creator reward because Bot created this issue." };
}

const result = await generatePermitForComments(
Expand Down

0 comments on commit 8542538

Please sign in to comment.