Skip to content

Conversation

@issyl0
Copy link
Member

@issyl0 issyl0 commented Nov 11, 2025

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

  • We frequently assess contributions over quarters. Inputting the dates in --from and --to requires effort and can lead to missing a day's contributions upon misremembering "thirty days hath September, April, June, and November...".
  • Hence, add a --quarter= flag to specify the quarter to search. If omitted, the past year is used as before. If --from or --to are set, they take precedence over --quarter=.
  • The --quarter option is only valid for the current year. To look at previous years, use --from and --to as before.

Before:

$ brew contributions --user=issyl0 --from=2025-07-01 --to=2025-09-30
issyl0 contributed 13 times (merged PR author), 16 times (approved PR reviewer), 61 times (commit author or committer) and 90 times (total) between 2025-07-01 and 2025-09-30.

$ brew contributions --user=issyl0 --from=2025-10-01
issyl0 contributed 11 times (merged PR author), 9 times (approved PR reviewer), 19 times (commit author or committer) and 39 times (total) after 2025-10-01.

After:

$ brew contributions --user=issyl0 --quarter=3
issyl0 contributed 13 times (merged PR author), 16 times (approved PR reviewer), 61 times (commit author or committer) and 90 times (total) between 2025-07-01 and 2025-09-30.

$ brew contributions --user=issyl0 --quarter=4
issyl0 contributed 11 times (merged PR author), 9 times (approved PR reviewer), 19 times (commit author or committer) and 39 times (total) between 2025-10-01 and 2025-12-31.

Copilot AI review requested due to automatic review settings November 11, 2025 13:47
Copilot finished reviewing on behalf of issyl0 November 11, 2025 13:50
Copy link
Contributor

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

This PR adds a --quarter= flag to the brew contributions command to simplify querying contributions by calendar quarter, eliminating the need to manually calculate and input date ranges with --from and --to flags.

  • Adds --quarter= flag that accepts quarter values and defaults to the current quarter
  • Updates date calculation logic to derive from/to dates from the specified quarter
  • Adds quarter_dates helper method mapping quarters (1-4) to ISO 8601 date ranges for the current year

Reviewed Changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.

File Description
Library/Homebrew/dev-cmd/contributions.rb Implements quarter flag, quarter-to-date conversion logic, and updates command documentation
Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/contributions.rbi Adds Sorbet type signature for the new quarter method
Files not reviewed (1)
  • Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/contributions.rbi: Language not supported

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

@MikeMcQuaid
Copy link
Member

@issyl0 Unfortunately we don't do the dates on raw quarters. The last few dates we've done have been:

brew-contributions-2024-09-01-to-2025-12-01.csv
brew-contributions-2024-12-01-to-2025-03-01.csv
brew-contributions-2025-03-01-to-2025-06-01.csv
brew-contributions-2025-06-01-to-2025-09-01.csv

@issyl0
Copy link
Member Author

issyl0 commented Nov 11, 2025

Of course we don't - that would be too obvious. 😉

@issyl0 issyl0 closed this Nov 11, 2025
@MikeMcQuaid
Copy link
Member

@issyl0 Stop wait 😅! I still think this PR would be worthwhile, it's just maybe that we default to those stupid Homebrew contributions quarters instead or we change invoice dates to make this more obvious.

@issyl0 issyl0 reopened this Nov 11, 2025
@issyl0
Copy link
Member Author

issyl0 commented Nov 11, 2025

We've already changed invoice dates once, haven't we? And it wasn't too bad? Having "OK it's the start of a new quarter let's check eligibility for people's submissions" is more intuitive because it aligns with calendars?

But also if you want to default this quarter detection to the Homebrew quarters, I will - as long as Q1 starts in January and Q4 ends in December? 😱

@MikeMcQuaid
Copy link
Member

We've already changed invoice dates once, haven't we? And it wasn't too bad? Having "OK it's the start of a new quarter let's check eligibility for people's submissions" is more intuitive because it aligns with calendars?

We could change it but the reason we changed last time is to align so we'd know before people booked FOSDEM flights in December?

But also if you want to default this quarter detection to the Homebrew quarters, I will - as long as Q1 starts in January and Q4 ends in December? 😱

Who knows 😭

@MikeMcQuaid
Copy link
Member

Could even do something wild like --quarter --from 2025-09 or something

Copilot AI review requested due to automatic review settings November 11, 2025 22:10
@issyl0 issyl0 force-pushed the contributions-quarters branch from 25dc0ce to 14d8d22 Compare November 11, 2025 22:11
Copilot finished reviewing on behalf of issyl0 November 11, 2025 22:11
Copy link
Contributor

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

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/contributions.rbi: Language not supported

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

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Thanks @issyl0, looking great! Think once comments are addressed this should be good to self-merge.

- We frequently assess contributions over quarters. Inputting the dates
  in `--from` and `--to` requires effort and can lead to missing a day's
  contributions upon misremembering "thirty days hath September, April,
  June, and November...".
- Hence, add a `--quarter=` flag to specify the quarter to search. If
  omitted, the past year is used as before. If `--from` or `--to` are
  set, they take precedence over `--quarter=`.
- The `--quarter` option is only valid for the current year. To look at
  previous years, use `--from` and `--to` as before.
- These aren't standard quarterly dates. We've chosen our own so that we
  can use September to December's maintainer activity stats as part of
  checking eligibility for expensed attendance at the AGM in February
  each year.
@issyl0 issyl0 force-pushed the contributions-quarters branch from 14d8d22 to 198e2be Compare November 15, 2025 16:12
@issyl0 issyl0 added this pull request to the merge queue Nov 15, 2025
Merged via the queue into main with commit ca789b2 Nov 15, 2025
37 checks passed
@issyl0 issyl0 deleted the contributions-quarters branch November 15, 2025 16:47
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