Skip to content

chore: add scripts for reporting new contributors and code review statistics#5805

Merged
Xuanwo merged 1 commit intolance-format:mainfrom
westonpace:misc/community-scripts
Mar 9, 2026
Merged

chore: add scripts for reporting new contributors and code review statistics#5805
Xuanwo merged 1 commit intolance-format:mainfrom
westonpace:misc/community-scripts

Conversation

@westonpace
Copy link
Copy Markdown
Member

These are just some handy scripts for looking at community health.


I used Claude Opus 4.5 (claude-opus-4-5-20251101) in the creation of these scripts. I have reviewed the contents and take full responsibility for them.

@github-actions github-actions Bot added the chore label Jan 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Code Review

Overall: These are straightforward utility scripts for community health tracking. The code is clean and well-structured. A few observations:

P1 Issues

  1. review_stats.py - Cache invalidation missing: The PR review cache (pr_reviews) grows unbounded and stores stale data forever. Old PRs remain cached even after the 30-day window passes. Consider:

    • Adding a timestamp to cached entries and purging entries older than 30 days
    • Or simply not caching PR reviews since the data changes over time (reviews can be added after merge)
  2. new_contributors.py - Potential false positives: Contributors whose email cannot be resolved to a GitHub username are included in the output with "(unknown)" username. These could be collaborators with write access who simply used a different email. The script's current logic includes them as "non-write contributors" which may overcount community contributions. Consider adding a note in the output or filtering these separately.

Minor Observations (not blocking)

  • Both scripts duplicate get_collaborators_with_write() - could be extracted to a shared module if more scripts are added later
  • No --help or argument parsing, but acceptable for internal utility scripts

No security concerns. No test coverage, but these are developer tools not part of the main codebase.

@Xuanwo Xuanwo merged commit 38a2369 into lance-format:main Mar 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants