Skip to content

feat: suggest only people who committed 5 times in the past 30 days (Or an average of 1.25 posts a week) - #1676

Open
ericvanjohnson wants to merge 1 commit into
dev-null-sh:productionfrom
ericvanjohnson:feat/suggest-active-committers
Open

ericvanjohnson wants to merge 1 commit into
dev-null-sh:productionfrom
ericvanjohnson:feat/suggest-active-committers

Conversation

@ericvanjohnson

@ericvanjohnson ericvanjohnson commented Nov 25, 2026 •

Copy link
Copy Markdown

The current "Who to follow" might suggest someone with a single visible commit, so people who posted once long ago might appear next to active ones.

  • Suggestions on the web, in onboarding, and through the API now only include people with at least 5 visible top-level commits in the past 30 days. Replies don't count, as before.
  • Which people are picked and in what order is unchanged.
  • A new activeCommitter() user factory state makes someone suggestable in tests.

The change is pretty simple. Most of the changed files were tests that needed updating. All test seem to pass.

Summary by CodeRabbit

  • Updates
    • Suggested users are now limited to people with at least five visible, top-level commits from the past 30 days. Replies and older commits don’t count toward eligibility.

Who to follow suggested anyone with a single visible commit, ever, so
people who posted once long ago kept showing up next to active ones.

- Suggestions on the web, in onboarding and through the API now only
  include people with at least 5 visible top-level commits in the past
  30 days. Replies don't count, as before.
- Which people are picked and in what order is unchanged.
- A new activeCommitter() user factory state makes someone suggestable
  in tests.
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Suggested-user candidates now need at least five visible, top-level commits from the past 30 days. A new factory state creates five related commits, and unit and feature test fixtures use that state.

Changes: Active Committer Suggestions

Layer / File(s) Summary
Commit eligibility and query coverage
app/Queries/SuggestedUsersQuery.php, database/factories/UserFactory.php, tests/Unit/Queries/SuggestedUsersQueryTest.php
The query now requires five visible top-level commits within the past 30 days. The factory adds an activeCommitter() state, and unit tests cover recent commits, older commits, and replies.
Feature test fixture updates
tests/Feature/ContextualSuggestedUsersTest.php, tests/Feature/Controllers/Api/SuggestedUserControllerTest.php, tests/Feature/Controllers/LogControllerTest.php, tests/Feature/Controllers/OnboardingControllerTest.php, tests/Feature/LiveStreamDeadlinesTest.php
Feature tests use the activeCommitter() state for suggested-user fixtures. Their request flows and assertions remain unchanged.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: xheaven, mnapoli

Merge Risk: Minimal · up to d77ba

Suggested users are now limited to people with at least five recent top-level commits. No merge-blocking risk was found in the supplied changes, and the change is easy to revert.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title states the main change: suggestions are limited to users with five commits in the past 30 days. The raw summary confirms SuggestedUsersQuery now applies a 5-commit and 30-day threshold, and …
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.
Full details: Title check

Explanation

The title states the main change: suggestions are limited to users with five commits in the past 30 days. The raw summary confirms SuggestedUsersQuery now applies a 5-commit and 30-day threshold, and the tests and factory support this. The parenthetical average of 1.25 posts a week is a derived figure (5 commits over about 4 weeks) and is accurate but adds detail beyond the core change. The title is specific and clearly related to the changeset.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a518f4ba-2b23-4135-a929-aa310667ea6b
Commits

Reviewing files that changed from the base of the PR and between b683891 and d77ba56.

Files selected for processing: 8

  • app/Queries/SuggestedUsersQuery.php
  • database/factories/UserFactory.php
  • tests/Feature/ContextualSuggestedUsersTest.php
  • tests/Feature/Controllers/Api/SuggestedUserControllerTest.php
  • tests/Feature/Controllers/LogControllerTest.php
  • tests/Feature/Controllers/OnboardingControllerTest.php
  • tests/Feature/LiveStreamDeadlinesTest.php
  • tests/Unit/Queries/SuggestedUsersQueryTest.php

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

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.

1 participant