feat(discussions): add GitHub Discussions activity widget#600
Conversation
|
@mallya-m 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. |
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
|
@Priyanshu-byte-coder could you please add the |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Please fix before merging:
- Missing EOF newlines — all changed files must end with
\n - Hardcoded Tailwind red colors in DiscussionsWidget — replace with CSS vars:
text-red-*→text-[var(--destructive)]bg-red-*→bg-[var(--destructive)]
Colors must go through CSS variables to support dark/light theming.
|
@Priyanshu-byte-coder both issues fixed:
Ready for merge! |
|
@Priyanshu-byte-coder the only remaining CI failure is The test checks for a single heading named "DevTrack" but the landing page now has two:
This was introduced by a recent merge to main. My changes only touch dashboard components and don't affect the landing page at all. The same test fails on a fresh checkout of main. All 5 other tests pass. Ready for merge! |
|
Two issues to fix before merge: 1. GraphQL injection risk — use variables `{ search(query: "commenter: type:discussion", ...) { ... } }`If body: JSON.stringify({
query: `query(: String!) { search(query: "commenter:$login type:discussion", type: DISCUSSION, first: 100) { discussionCount } }`,
variables: { login },
})2. Missing EOF newline in |
|
@Priyanshu-byte-coder the lint/build failures are caused by pre-existing errors in files I didn't touch:
My PR only touches:
These errors exist on main independently of my changes. |
|
@Priyanshu-byte-coder rebased onto latest main — the lint errors in Footer.tsx and BadgeSection.tsx are now fixed via the upstream merge. Ready for merge! |
What does this PR do?
Adds a Discussion Activity widget to the dashboard showing how active the user is in GitHub Discussions — discussions started, comments given, and marked-as-answer count.
Related issue
Closes #258
Changes made
GET /api/metrics/discussionsroute using GitHub REST search + GraphQL/search/issues?q=author:{user}+type:discussionDiscussionsWidget.tsxcomponent with 3 stat chipsHow to test
Screenshots