Skip to content

Add Markdown summaries to maintainer reports - #24497

Merged
p-linnane merged 1 commit into
mainfrom
maintainer-report-summary
Nov 6, 2026
Merged

p-linnane merged 1 commit into
mainfrom
maintainer-report-summary

Conversation

@p-linnane

@p-linnane p-linnane commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

brew contributions --maintainer-report-csv also writes brew-contributions-FROM-to-TO.md next to its CSV. The summary covers the latest completed quarter that the maintainer met and lead met columns assess and progress through the current quarter, lists each Maintainer below the Maintainer or Lead Maintainer criteria with their numerical gap, shows missing history as unknown rather than zero and marks gaps as lower bounds when any report in the quarter is capped.

The monthly maintainer contribution report pull requests need this summary, and building it here keeps it on the same per-repository totals and thresholds as the CSV instead of a separate copy, while making it available to anyone running brew contributions. To share those totals, maintainer_activity_report now wraps a new maintainer_activity_totals and the three inline activity threshold checks use activity_met.


  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

Claude Code (Opus 5.5) wrote the change and tests and ran brew lgtm. Codex (GPT-6 Astra) reviewed the first version, whose two findings are addressed here.


@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features

    • Maintainer activity reports now include a Markdown summary alongside the CSV, covering the latest completed quarter and, where applicable, the current quarter.
    • The summary shows activity totals, gaps against thresholds, capped counts as lower bounds, and notes about exemptions or incomplete history.
    • Activity checks now account for contribution totals across multiple repositories.
  • Documentation

    • Updated command-line help and documentation to describe the Markdown summary and report criteria.

The contributions command now calculates activity from per-repository totals and capped-count data. It writes a Markdown summary beside each Maintainer report CSV, with completed-quarter activity and, when applicable, current-quarter progress. Tests, command completions and documentation describe the summary and reporting criteria.

Changes: Maintainer activity reporting

Layer / File(s) Summary
Activity totals and thresholds
Library/Homebrew/dev-cmd/contributions.rb
Activity calculations use per-repository totals and shared threshold checks. Reports retain capped-user data and use shared helpers for repository labels and activity periods.
Markdown summary output
Library/Homebrew/dev-cmd/contributions.rb, Library/Homebrew/test/dev-cmd/contributions_spec.rb, completions/*, docs/Manpage.md, manpages/brew.1
The command writes a Markdown summary beside the CSV with activity results, numerical gaps, unknown-history notes, exemptions and capped lower bounds. Tests cover completed- and current-quarter output and filtered reports. Command descriptions and documentation describe the summary and reporting criteria.
Merge Risk: Low · up to 28852

A malformed historical report may leave the new CSV written while preventing the Markdown summary and command completion. The risk is bounded but warrants owner awareness before merging.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly describes the addition of Markdown summaries to maintainer reports.
Description check Passed The description explains the Markdown summaries and the shared activity calculation changes.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 8912a057-4e46-491b-87ff-111a3f7c9bab
Commits

Reviewing files that changed from the base of the PR and between 0b98711 and 2885289.

Files selected for processing: 2

  • Library/Homebrew/dev-cmd/contributions.rb
  • Library/Homebrew/test/dev-cmd/contributions_spec.rb

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@MikeMcQuaid MikeMcQuaid left a comment

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.

Looks good! One nit, not blocking and no second review required.

@p-linnane
p-linnane force-pushed the maintainer-report-summary branch from 7f4c5d6 to 0b98711 Compare November 6, 2026 17:01

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Report unknown history for exempt Maintainers. · contributions.rb:1326-1327

Library/Homebrew/dev-cmd/contributions.rb:1326-1327
Minor · Functional Correctness · Quick win

Report unknown history for exempt Maintainers.

If user_totals is nil, the summary treats an exempt user as below the threshold. Count the user as unknown instead.

Suggested fix

-          maintainer_exempt = row["maintainer exempt"] == "true" && !maintainer_met
+          maintainer_exempt = row["maintainer exempt"] == "true" && maintainer_met == false

Add a test for an exempt Maintainer with incomplete history.

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 62c9b794-0459-45a2-ac58-9fc6a9535b13
Commits

Reviewing files that changed from the base of the PR and between 7f4c5d6 and 0b98711.

Files selected for processing: 6

  • Library/Homebrew/dev-cmd/contributions.rb
  • Library/Homebrew/test/dev-cmd/contributions_spec.rb
  • completions/fish/brew.fish
  • completions/zsh/_brew
  • docs/Manpage.md
  • manpages/brew.1
Files skipped from review as they are similar to previous changes: 2

  • completions/fish/brew.fish
  • completions/zsh/_brew

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

- `--maintainer-report-csv` also writes a Markdown summary next to the
  CSV covering completed-quarter results and current-quarter progress,
  with each Maintainer's numerical gap.
- Build it from the same per-repository totals as the `maintainer met`
  and `lead met` columns so the activity thresholds live in one place
  rather than in each script that reads the report.
- Show missing history as unknown rather than zero and mark gaps as
  lower bounds when any report in the quarter is capped.
- Normalise `--from` and `--to` to `YYYY-MM-DD` before string
  comparisons and report filenames use them, so other ISO 8601 forms
  such as `20261101` don't miscount activity or crash the summary.

Signed-off-by: Patrick Linnane <patrick@linnane.io>
@p-linnane
p-linnane force-pushed the maintainer-report-summary branch from 0b98711 to 2885289 Compare November 6, 2026 17:16
@p-linnane
p-linnane enabled auto-merge November 6, 2026 17:34
@p-linnane
p-linnane added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit c32e912 Nov 6, 2026
55 checks passed
@p-linnane
p-linnane deleted the maintainer-report-summary branch November 6, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址