[Improve]:Use top-level` updatedAt` instead of `timelineItems` connection for score calculation
- Dominant language
- TypeScript
- Stars
- 716
- Forks
- 1.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 35
Description
In processHotDiscussions, the score is calculated using:
`score: finalInteractionsCount / (monthsSince(discussion.timelineItems.updatedAt) + 2) ** 1.8`
However, in the GraphQL queries we fetch:
`timelineItems` is a connection type in GitHub GraphQL and is typically used for fetching timeline events (with` nodes, edges,` etc.).
Both Issue and PullRequest already expose a top-level updatedAt field in the GitHub schema.
Using` timelineItems` to retrieve the last update timestamp introduces:
Additional query complexity
Less obvious intent
Dependency on connection shape
Harder-to-read scoring logic
**Expected Behavior**
The score calculation should rely on the top-level updatedAt field:
`updatedAt`
And then:
`monthsSince(discussion.updatedAt)`
This would:
Simplify the query
Make intent clearer
Align with standard GitHub schema usage
Reduce reliance on connection fields
Steps to produce
1:-Clone the Repo
2:-Read two below files and analyse
`scripts/dashboard/issue-queries.ts`
`scripts/dashboard/build-dashboard.ts` (score calculation inside processHotDiscussions)
Contributor guide
Research direction
Read scripts/dashboard/issue-queries.ts and scripts/dashboard/build-dashboard.ts, starting with the GitHub GraphQL fields requested and processHotDiscussions. Confirm that the dashboard score uses the top-level updatedAt value and that the query no longer relies on the timelineItems connection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, graphql, typescript
- Domain
- analytics, tooling
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100