Skip to content

feat: Autogenerate contributor pool report#593

Merged
nzakas merged 2 commits into
mainfrom
contributor-pool-report
Jul 7, 2025
Merged

feat: Autogenerate contributor pool report#593
nzakas merged 2 commits into
mainfrom
contributor-pool-report

Conversation

@nzakas

@nzakas nzakas commented Jun 26, 2025

Copy link
Copy Markdown
Member

This pull request introduces a new workflow for generating a monthly Contributor Pool Report, along with the necessary script, configurations, and documentation updates. On the first of every month, a report will be generated and a pull request will be created to review the report.

Workflow Automation:

  • .github/workflows/generate-contributor-pool.yml: Added a new GitHub Actions workflow to generate a Contributor Pool Report on the 1st of every month. It installs dependencies, runs the report generation script, and creates a pull request with the report.

New Script:

  • scripts/generate-contributor-pool.js: Added a script to fetch pull request data from the GitHub API, process it using an AI model for summarization, and generate a Markdown report. The script includes logic for grouping PRs by contributor and estimating effort levels.

Configuration Updates:

  • package.json: Added a new generate:contributor-pool script to the scripts section for running the contributor pool report generation script.

Documentation:

@fasttime fasttime added this to Triage Jun 30, 2025
@github-project-automation github-project-automation Bot moved this to Needs Triage in Triage Jun 30, 2025
@fasttime fasttime moved this from Needs Triage to Triaging in Triage Jun 30, 2025
@fasttime fasttime moved this from Triaging to Implementing in Triage Jun 30, 2025
Comment thread scripts/generate-contributor-pool.js Outdated
Comment thread scripts/generate-contributor-pool.js
Comment thread .github/workflows/generate-contributor-pool.yml
Comment thread notes/2025/2025-06-01-contributor-pool.md
Comment on lines +164 to +171
body: JSON.stringify({
model: AI_MODEL,
messages: [
{ role: "system", content: PROMPT },
{ role: "user", content: JSON.stringify(grouped) }
],
temperature: 0.7
})

@fasttime fasttime Jul 3, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to start the new workflow in a test repo today, and it run into an error:

> tsc-meetings-test@1.0.0 generate:contributor-pool
> node ./scripts/generate-contributor-pool.js
Fetching PRs from GitHub API with query:
org:eslint type:pr label:"contributor pool" merged:2025-06-01..2025-06-30
Fetching page 1...
Retrieved 22 of 22 total results
Fetched 22 PRs total
Found 21 contributor PRs merged.
{"error":{"code":"tokens_limit_reached","message":"Request body too large for gpt-4o model. Max size: 8000 tokens.","details":"Request body too large for gpt-4o model. Max size: 8000 tokens."}}
/home/runner/work/Test/Test/scripts/generate-contributor-pool.js:176
        throw new Error(`AI model request failed with status ${response.status}`);
              ^
Error: AI model request failed with status 413
    at fetchModelResponse (/home/runner/work/Test/Test/scripts/generate-contributor-pool.js:176:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async /home/runner/work/Test/Test/scripts/generate-contributor-pool.js:211:23
Node.js v22.16.0
Error: Process completed with exit code 1.

The error message states that the maximum body size is 8000 tokens, but I'm not sure how tokens are counted in this context. I added a log line and it showed that the body length was 45026 characters.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I was afraid of...the token limit on GitHub is really small. I already crunched the data as small as I could. Apparently my personal account has a higher token limit (16,000) so when I was testing with a token I generated, it worked.

The only option to make this work is to move into the paid service. These types of requests are fairly cheap, typically well under $1 to run. I think it could be worthwhile to do that to help automate more tasks for us.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently my personal account has a higher token limit (16,000) so when I was testing with a token I generated, it worked.

Now that you mention it, I was running the test in a private repo of my own GitHub user, and that's where the 8000 token limit came from. It's possible that the token limit for the eslint organization is higher than that. I guess we'll have to run the workflow to know for sure.

The only option to make this work is to move into the paid service. These types of requests are fairly cheap, typically well under $1 to run. I think it could be worthwhile to do that to help automate more tasks for us.

I was thinking about splitting the query into multiple requests to stay under the limit, but if we can get the whole response in one go for just a few cents, that would be even better.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible that the token limit for the eslint organization is higher than that. I guess we'll have to run the workflow to know for sure.

That's a good point. I'll merge this and run it to see what happens. If it can't run, I'll follow up with another PR that uses a separate token from Open AI.

@nzakas nzakas merged commit e59f9c7 into main Jul 7, 2025
3 checks passed
@nzakas nzakas deleted the contributor-pool-report branch July 7, 2025 15:02
@github-project-automation github-project-automation Bot moved this from Implementing to Complete in Triage Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

2 participants