Skip to content
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

Merged
merged 66 commits into from
Apr 9, 2025

Conversation

DigitalBrainJS
Copy link
Contributor

No description provided.

� 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
DigitalBrainJS and others added 27 commits August 17, 2024 23:29
@jasonsaayman jasonsaayman requested a review from Copilot April 9, 2025 06:58
@jasonsaayman jasonsaayman merged commit cb58c4d into axios:master Apr 9, 2025
4 checks passed
Copy link

@Copilot Copilot AI left a 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()]) {
Copy link
Preview

Copilot AI Apr 9, 2025

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.

Comment on lines 576 to +582
sponsor.tier = findTier(lastTransactionAmount, sponsorTiers);

let partiallyPaid = findTier(lastTransactionAmount * 1.1, sponsorTiers);

if (sponsor.tier !== partiallyPaid) {
sponsor.tier = partiallyPaid;
}
Copy link
Preview

Copilot AI Apr 9, 2025

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.

Suggested change
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants