Skip to content

[BUG] Community engagement metric always reports zero discussion activity #3352

Description

@nyxsky404

Bug Description

The /api/metrics/devtrack-badges endpoint always returns discussions.count: 0 and discussions.points: 0, even for users with GitHub Discussions activity in the selected 30-day window. The route sets discussionsPoints to a placeholder value and never queries the GitHub GraphQL API. This makes the community-engagement score and its breakdown incomplete.

Steps to Reproduce

  1. Sign in with a GitHub account that has created or commented on a Discussion in the last 30 days.
  2. Open the dashboard view that requests /api/metrics/devtrack-badges, or call that endpoint while authenticated.
  3. Inspect the breakdown.discussions object in the response.

Affected Area

Dashboard

Screenshots

Not applicable; the zero-valued response is produced server-side.

Browser & OS

Any browser and operating system.

Environment

Both

Additional Context

The other fields are populated from GitHub search responses, but the endpoint currently contains const discussionsPoints = 0 and returns { count: 0, points: discussionsPoints } for the Discussions category. The implementation should retrieve the relevant Discussion and DiscussionComment contribution count through GitHub GraphQL (or explicitly remove the unsupported category from the score until it is available), then include the result in the score breakdown.

Metadata

Metadata

Assignees

Labels

gssoc:assignedGSSoC: Issue assigned to a contributor

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions