-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(sponsors): respect hide config for the Readme.md sponsor list generator; #243
fix(sponsors): respect hide config for the Readme.md sponsor list generator; #243
Conversation
� Conflicts: � inert.config.js � package.json
…re/sponsors-config � Conflicts: � data/sponsors.json
…re/sponsors-config � Conflicts: � data/sponsors.json
…re/sponsors-config � Conflicts: � scripts/updateData.js
…re/sponsors-generator � Conflicts: � data/sponsors.json � scripts/updateData.js
# Conflicts: # data/sponsors.json # scripts/updateData.js
� Conflicts: � data/sponsors.json
…me sponsor generator;
# Conflicts: # data/sponsors.json
…ollective's isActive property.
…/sponsors-generator
…/sponsors-generator
…dates due to payment delays;
…/sponsors-generator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 6 changed files in this pull request and generated 2 comments.
Files not reviewed (4)
- data/sponsors.json: Language not supported
- scss/sponsors.scss: Language not supported
- templates/home.ejs: Language not supported
- templates/post.ejs: Language not supported
Comments suppressed due to low confidence (1)
scripts/updateData.js:706
- [nitpick] Review the updated console log format to ensure that the score, tier, and tier price are clearly distinguished and consistently formatted for easier debugging.
console.log(...score and tier output)
} = await readJSON(sponsorsConfig) || {}; | ||
|
||
const mergedSponsors = {}; | ||
|
||
// merge Open Collective sponsors | ||
collectiveSponsors.forEach(sponsor => { | ||
if (sponsor.role !== 'BACKER' && sponsor.role) { | ||
if ((sponsor.role !== 'BACKER' && sponsor.role) || hide[sponsor.login?.toLowerCase()] || hide[sponsor.name?.toLowerCase()]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider extracting the hide check into a separate variable (e.g., isHidden) to improve clarity and reduce the potential for errors in this complex conditional.
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
sponsor.tier = findTier(lastTransactionAmount, sponsorTiers); | ||
|
||
let partiallyPaid = findTier(lastTransactionAmount * 1.1, sponsorTiers); | ||
|
||
if (sponsor.tier !== partiallyPaid) { | ||
sponsor.tier = partiallyPaid; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The sponsor tier is reassigned using the partiallyPaid value immediately after initial assignment; consolidating the tier determination logic could help avoid potential inconsistencies.
sponsor.tier = findTier(lastTransactionAmount, sponsorTiers); | |
let partiallyPaid = findTier(lastTransactionAmount * 1.1, sponsorTiers); | |
if (sponsor.tier !== partiallyPaid) { | |
sponsor.tier = partiallyPaid; | |
} | |
sponsor.tier = findTier(lastTransactionAmount * 1.1, sponsorTiers); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
No description provided.