Skip to content

feat: add foc-review-stats tool for PR/review team stats collecting#41

Merged
rvagg merged 2 commits into
masterfrom
rvagg/foc-review-stats
May 14, 2026
Merged

feat: add foc-review-stats tool for PR/review team stats collecting#41
rvagg merged 2 commits into
masterfrom
rvagg/foc-review-stats

Conversation

@rvagg
Copy link
Copy Markdown
Contributor

@rvagg rvagg commented May 14, 2026

(Mostly) AI generated with light reviews. I run this for the Eng & CX Sync with the --html output 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).

@rvagg rvagg requested review from BigLep, Copilot and rjan90 May 14, 2026 05:08
@FilOzzy FilOzzy added this to FOC May 14, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC May 14, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-stats package (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.

Comment thread foc-review-stats/foc_review_stats/render.py Outdated
Comment thread foc-review-stats/foc_review_stats/render.py Outdated
Comment thread foc-review-stats/foc_review_stats/stats.py Outdated
Comment thread foc-review-stats/foc_review_stats/cli.py
Comment thread foc-review-stats/foc_review_stats/cli.py Outdated
Comment thread foc-review-stats/foc_review_stats/github.py Outdated
Copy link
Copy Markdown
Contributor

@rjan90 rjan90 left a comment

Choose a reason for hiding this comment

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

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.

@github-project-automation github-project-automation Bot moved this from 📌 Triage to ✔️ Approved by reviewer in FOC May 14, 2026
@rvagg rvagg merged commit 782f2c2 into master May 14, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

4 participants