Skip to content

contributions: allow --user with --maintainer-report-csv - #23371

Merged
MikeMcQuaid merged 1 commit into
mainfrom
contributions-maintainer-report-user
Jul 31, 2026
Merged

contributions: allow --user with --maintainer-report-csv#23371
MikeMcQuaid merged 1 commit into
mainfrom
contributions-maintainer-report-user

Conversation

@p-linnane

Copy link
Copy Markdown
Contributor

brew contributions --maintainer-report-csv=YEAR-QUARTER scans every Maintainer listed at the end of that quarter. That is right for the quarterly governance report, but it is a lot of Git and GitHub work when you only need to check one person, and --user conflicted with --maintainer-report-csv so there was no way to narrow it.

Dropping that conflict lets --maintainer-report-csv=YEAR-QUARTER --user=USER emit the full report schema for only the requested quarter-end Maintainers. The filter runs before the tenure and contribution scans, usernames match case-insensitively, emails resolve to GitHub logins as elsewhere in the command, and Lead Maintainer status and the historical quarter semantics are unchanged.

Requesting someone who was not a Maintainer at the end of the quarter errors and names only the unmatched users. Filtered reports are written to brew-contributions-FROM-to-TO-USER.csv so they cannot overwrite a full report. Behavior with --user omitted is unchanged.


  • 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 Hyperfine benchmarks.
  • 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) drafted the implementation and tests; I reviewed the diff, verified the new tests fail without the change and pass with it, and ran brew lgtm + targeted specs.


Signed-off-by: Patrick Linnane <patrick@linnane.io>
Copilot AI review requested due to automatic review settings July 31, 2026 05:04

Copilot AI 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.

Pull request overview

This pull request updates brew contributions to allow --user to be used together with --maintainer-report-csv, enabling generation of a maintainer-report CSV for a specific subset of quarter-end Maintainers (rather than scanning all Maintainers for that quarter).

Changes:

  • Removes the --maintainer-report-csv/--user conflict and adds filtering logic so --user limits the report to matching quarter-end Maintainers (including email-to-login resolution).
  • Adjusts maintainer-report CSV output filenames to include the filtered user set to avoid overwriting the unfiltered report.
  • Updates help/manpage/docs and shell completions, and adds RSpec coverage for filtering/error cases.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
manpages/brew.1 Documents the updated --user semantics with --maintainer-report-csv and the filtered-report filename behavior.
Library/Homebrew/test/dev-cmd/contributions_spec.rb Adds specs covering maintainer-report user filtering, email resolution errors, and filtered output filename behavior.
Library/Homebrew/dev-cmd/contributions.rb Implements allowing --user with --maintainer-report-csv, filters quarter-end Maintainers, and changes the report output filename when filtered.
docs/Manpage.md Mirrors manpage/help updates for contributions options and filtered maintainer-report output naming.
completions/zsh/_brew Updates zsh completions to reflect that --user is allowed with --maintainer-report-csv and updates option descriptions.
completions/fish/brew.fish Updates fish completions descriptions to match the new --user/maintainer-report behavior and filename wording.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Library/Homebrew/dev-cmd/contributions.rb

@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.

Good idea!

@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Jul 31, 2026
Merged via the queue into main with commit 1336e82 Jul 31, 2026
46 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the contributions-maintainer-report-user branch July 31, 2026 08:04
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.

3 participants