tsc-meetings icon indicating copy to clipboard operation
tsc-meetings copied to clipboard

Add contributor pool funds calculation to generate-contributor-pool.js

Open Copilot opened this issue 6 months ago • 0 comments

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 retrieve monthlyDonations from https://raw.githubusercontent.com/eslint/eslint.org/refs/heads/main/src/_data/sponsors.json with structure validation
  • Extracted CONTRIBUTOR_POOL_DIVISOR = 10 constant for the pool calculation formula
  • Updated generateReport() to accept and display contributorPoolFunds as "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) / 100 for 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.

Copilot avatar Oct 31 '25 14:10 Copilot