close
Skip to content

Inquiry: Check slug configuration for multi-commit contributor badges (#423–#426) #24114

Closed

Description

@JaniDhruv

Describe the bug

I recently reached 4 merged contributions on forem/forem. While the initial dev-contributor badge was awarded promptly, the multi-commit badge (4x-commit-club) has not appeared despite multiple hourly cron cycles.

In Badges::AwardContributorFromGithub:

BADGE_SLUGS = {
  "dev-contributor": 1,
  "4x-commit-club": 4,
  "8x-commit-club": 8,
  "16x-commit-club": 16,
  "32x-commit-club": 32
}.freeze

The service relies on Badge.id_for_slug(slug). If Badge.find_by(slug: slug) returns nil, the badge ID is omitted and skipped during the award loop.

Because Forem only defines resources :badges, only: [:index] without individual /badge/:slug show routes, badge slugs are not publicly visible or verifiable from the outside, so this is an unconfirmed hypothesis I am requesting an admin to verify.

To Reproduce

  1. Have 4+ merged pull requests to forem/forem.
  2. Query the GitHub Contributors API (GET /repos/forem/forem/contributors?per_page=100&anon=true) to verify the account is linked and reports contributions: 4.
  3. Check the DEV profile; the 1x dev-contributor badge is present, but the 4x badge is missing.

Expected behavior

A contributor with 4 merged commits should automatically be awarded the 4x contributor badge.

Screenshots

On the badge catalog (/badges):

  • Badge ID 423 displays:
    • Title: 4x DEV Contributor Club
    • Description: 4x-commit-club
  • Badge IDs 424–426 display similar patterns (8x-commit-club, etc.).

Desktop (please complete the following information):

  • OS, version: N/A (Backend service)
  • Browser, version: N/A

Smartphone (please complete the following information):

  • Device: N/A
  • OS, version: N/A
  • Browser, version: N/A

Additional context

Could an admin check the slug value for badge IDs 423–426 in the admin panel or database? If the database slug does not match "4x-commit-club", AwardContributorFromGithub will skip awarding the badge.

I have also opened PR #24113 to add a logger warning when a configured slug is not found in the database, ensure award idempotency, and attach the missing rewarding context message.

Activity

  1. github-actions commented on Oct 24, 2026

    @github-actions
    Contributor

    Thanks for the issue, we will take it into consideration! Our team of engineers is busy working on many types of features, please give us time to get back to you.

    To our amazing contributors: issues labeled bug are always up for grabs, but for feature requests, please wait until we add a ready for dev before starting to work on it.

    To claim an issue to work on, please leave a comment. If you've claimed the issue and need help, please ping @forem-team. The OSS Community Manager or the engineers on OSS rotation will follow up.

    For full info on how to contribute, please check out our contributors guide.

  2. JaniDhruv commented on Oct 24, 2026

    @JaniDhruv
    ContributorAuthor

    Fixed and merged via PR #24113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugalways open for contribution

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions