#1676

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

Openericvanjohnsonwants to merge intofrom

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.

Activity

2
coderabbitai[bot]7d ago

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: 4

Check nameStatusExplanation
Description CheckCheck skipped - CodeRabbit’s high-level summary is enabled.
Title checkThe 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 checkCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkCheck 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 b6838917df9f07eaf06e74d712d246e7af3de237 and d77ba56e52cfa6f47add538b1589d7e80e1de46c.

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.