Skip to content

[FEAT] Add GitHub Discussions activity to dashboard metrics #579

Open
Muragesh-24 wants to merge 3 commits into
Priyanshu-byte-coder:mainfrom
Muragesh-24:discussion
Open

[FEAT] Add GitHub Discussions activity to dashboard metrics #579
Muragesh-24 wants to merge 3 commits into
Priyanshu-byte-coder:mainfrom
Muragesh-24:discussion

Conversation

@Muragesh-24
Copy link
Copy Markdown
Contributor

Summary

Adds a new Community Discussions metrics card to the dashboard, backed by GitHub GraphQL, to show discussions started, accepted answers, and discussion comments. Also updates GitHub auth to request the read:discussion scope.

Closes #185

Type of Change

  • New feature

Changes Made

  • Added a new discussions metrics API route.
  • Added a new dashboard card for discussion analytics with loading, error, and empty states.
  • Updated GitHub auth scope to include read:discussion.
  • Wired the new card into the PR/Issues metrics area of the dashboard.

How to Test

  1. Sign out and sign back in so GitHub re-prompts for the updated read:discussion scope.
  2. Open a repository with GitHub Discussions enabled and create a discussion.
  3. Reply to the discussion and mark a response as the accepted answer.
  4. Refresh the dashboard and confirm the new Community Discussions card shows non-zero counts.
  5. If the repo/org does not have Discussions enabled, confirm the card falls back gracefully instead of failing.
image

Checklist

  • Linked issue in summary
  • npm run lint passes locally
  • No TypeScript errors (npm run type-check)
  • Self-reviewed the diff
  • Added/updated tests if applicable

@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

@Muragesh-24 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:feature GSSoC type bonus: new feature labels May 21, 2026
@github-actions
Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

@Priyanshu-byte-coder Priyanshu-byte-coder added the level:intermediate GSSoC: Intermediate difficulty (35 pts) label May 21, 2026
Copy link
Copy Markdown
Owner

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Choose a reason for hiding this comment

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

Missing EOF newline at the end of src/app/api/metrics/discussions/route.ts. Please add a newline after the last closing brace.

@Muragesh-24
Copy link
Copy Markdown
Contributor Author

Missing EOF newline at the end of src/app/api/metrics/discussions/route.ts. Please add a newline after the last closing brace.

@Priyanshu-byte-coder now i added EOF endline in src/app/api/metrics/discussions/route.ts

Copy link
Copy Markdown
Owner

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Choose a reason for hiding this comment

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

Two issues:

  1. Missing EOF newline
  2. Raw Tailwind red colors — replace with CSS vars:
    • border-red-500/20, bg-red-500/10, text-red-400, border-red-500/30, text-red-300, hover:bg-red-500/10 → use var(--destructive) and var(--border)

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

Labels

gssoc26 GSSoC 2026 contribution level:intermediate GSSoC: Intermediate difficulty (35 pts) type:feature GSSoC type bonus: new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add GitHub Discussions activity to dashboard metrics

2 participants