contributions: allow --user with --maintainer-report-csv - #23371
Merged
Conversation
Signed-off-by: Patrick Linnane <patrick@linnane.io>
Contributor
There was a problem hiding this comment.
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/--userconflict and adds filtering logic so--userlimits 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.
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.
brew contributions --maintainer-report-csv=YEAR-QUARTERscans 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--userconflicted with--maintainer-report-csvso there was no way to narrow it.Dropping that conflict lets
--maintainer-report-csv=YEAR-QUARTER --user=USERemit 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.csvso they cannot overwrite a full report. Behavior with--useromitted is unchanged.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?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.