Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ const addHeadOverToGitPOAP = (comment: string): string =>

// Hardcode extra comments for ethereum-org-website
const ethereumOrgWebsiteComment =
'Be sure to join the [Ethereum.org discord](https://ethereum.org/discord) if you are interested in contributing further to the project or have any questions for the team.';
'Join the [ethereum.org Discord server](https://ethereum.org/discord) to explore more ways to contribute to the project. Depending on the tasks you complete, you may also unlock additional rewards. Visit [ethereum.org/contributing](https://ethereum.org/contributing) to learn more.';

const ethereumOrgWebsiteSubcomment = 'Keep buidling, keep learning, and let\'s grow the Ethereum open-source community together 🌱'

export function generateComment(repoId: number, claims: BotClaimData[]): string {
let qualifier: string;
Expand All @@ -55,10 +57,6 @@ export function generateComment(repoId: number, claims: BotClaimData[]): string

let comment = `Congrats, your important contribution to this open-source project has earned you ${qualifier}!\n\n`;

if (repoId === ETHEREUM_ORG_WEBSITE_ID) {
comment += `${ethereumOrgWebsiteComment}\n\n`;
}

for (const claim of claims) {
if (claim.gitPOAP.id && claim.gitPOAP.name && claim.gitPOAP.imageUrl) {
comment += `
Expand All @@ -68,7 +66,17 @@ export function generateComment(repoId: number, claims: BotClaimData[]): string
}
}


if (repoId === ETHEREUM_ORG_WEBSITE_ID) {
comment += `${ethereumOrgWebsiteComment}\n\n`;
}

comment = addHeadOverToGitPOAP(comment);

if (repoId === ETHEREUM_ORG_WEBSITE_ID) {
comment += `${ethereumOrgWebsiteSubcomment}\n\n`;
}

comment = addLearnMore(comment);

return comment;
Expand Down