Add contributor pool funds calculation to generate-contributor-pool.js
The script now fetches monthly donations from the ESLint sponsors data and displays the calculated contributor pool funds (monthly donations / 10, truncated to 2 decimals) in the generated report.
Changes:
- Added
fetchMonthlyDonations()to retrievemonthlyDonationsfromhttps://raw.githubusercontent.com/eslint/eslint.org/refs/heads/main/src/_data/sponsors.jsonwith structure validation - Extracted
CONTRIBUTOR_POOL_DIVISOR = 10constant for the pool calculation formula - Updated
generateReport()to accept and displaycontributorPoolFundsas "Contributor Pool Funds: $X.XX" at the report header - Modified main execution to fetch PR data and donations in parallel, calculate funds using
Math.floor((monthlyDonations / CONTRIBUTOR_POOL_DIVISOR) * 100) / 100for proper truncation
Example output:
# Contributor Pool Report (09/01/2025 - 09/30/2025)
Contributor Pool Funds: $1231.23
## Pixel998 (17)
...
Original prompt
Update the generate-contributor-pool.js script so that it fetches https://raw.githubusercontent.com/eslint/eslint.org/refs/heads/main/src/_data/sponsors.json to retrieve the monthly donations. It should then divide that number by ten and truncate to two decimal places. That number should be presented as USD in the generated reported. Label the number "Contributor Pool Funds:"
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.