feat: add foc-review-stats tool for PR/review team stats collecting#41
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new foc-review-stats Python subpackage/CLI to collect per-contributor PR creation and review statistics across configured GitHub orgs/repos and render the results (text/Markdown/HTML) for team reporting workflows.
Changes:
- Introduces the
foc-review-statspackage (CLI, GitHub API client, aggregation, and renderers). - Adds default configuration (
team.toml) plus user-facing documentation (README.md). - Adds unit tests for the aggregation logic and pins dependencies via
uv.lock.
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| foc-review-stats/pyproject.toml | Defines the new package, dependencies, and foc-review-stats entrypoint script. |
| foc-review-stats/uv.lock | Locks runtime/dev dependencies for reproducible installs via uv. |
| foc-review-stats/README.md | Documents setup, usage, configuration, and troubleshooting for the tool. |
| foc-review-stats/team.toml | Provides default scope/team/ignored configuration used by the CLI. |
| foc-review-stats/foc_review_stats/init.py | Declares the module/package. |
| foc-review-stats/foc_review_stats/cli.py | Implements CLI argument parsing and orchestration (repo discovery, parallel fetching, rendering). |
| foc-review-stats/foc_review_stats/github.py | Implements GitHub GraphQL client helpers (repos, PRs, teams, display names). |
| foc-review-stats/foc_review_stats/stats.py | Implements aggregation logic and “top given/received” helpers. |
| foc-review-stats/foc_review_stats/render.py | Implements text/Markdown/HTML output rendering. |
| foc-review-stats/tests/init.py | Adds the test package marker file. |
| foc-review-stats/tests/test_stats.py | Adds unit tests covering aggregation rules (bots, ignored, self-review, dedupe, scope). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rjan90
reviewed
May 14, 2026
rjan90
approved these changes
May 14, 2026
Contributor
rjan90
left a comment
There was a problem hiding this comment.
Added on comment about potential edge-case if there is a ton of review events in a PR. But except of that, this looks good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(Mostly) AI generated with light reviews. I run this for the Eng & CX Sync with the
--htmloutput and copy/paste that from a browser window into the google doc and then I need to change the H2 formatting and the table column widths and then auto-height the rows (annoying but I weirdly have muscle memory for it now after only 3 times).