-
-
Notifications
You must be signed in to change notification settings - Fork 245
feat: add GitHub contributors graph #1445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
752f464 to
dc34dc7
Compare
📝 WalkthroughWalkthroughThis PR adds per-package repository references and a new "contributors" metric to the trends chart. It introduces a Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
| <PackageWeeklyDownloadStats | ||
| :packageName | ||
| :createdIso="pkg?.time?.created ?? null" | ||
| :repoRef="repoRef" | ||
| /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix repoRef nullability for PackageWeeklyDownloadStats.
repoRef can be null from useRepoMeta, but the child prop expects RepoRef | undefined, causing the reported type check failure. Normalise null to undefined (or widen the prop type).
🛠️ Suggested fix
- :repoRef="repoRef"
+ :repoRef="repoRef ?? undefined"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <PackageWeeklyDownloadStats | |
| :packageName | |
| :createdIso="pkg?.time?.created ?? null" | |
| :repoRef="repoRef" | |
| /> | |
| <PackageWeeklyDownloadStats | |
| :packageName | |
| :createdIso="pkg?.time?.created ?? null" | |
| :repoRef="repoRef ?? undefined" | |
| /> |
🧰 Tools
🪛 GitHub Check: 💪 Type check
[failure] 1371-1371:
Type 'RepoRef | null' is not assignable to type 'RepoRef | undefined'.
|
When switching to monthly or yearly, the component is designed to display estimations for incomplete periods. The facet does not appear to be working on the compare page. I would also move the fetching to the useCharts composable |
Yes, I did find it a bit weird that it was estimating how many contributors a package will have 😀 How should we handle the incomplete period though? 🤔 |
We are dealing with absolutes. n contributors today does not add up with n yesterday. So weekly, monthly, yearly should be averages. |
Likes also isn't additive, right? So maybe likes and contributors should be handled differently compared to downloads. |


I started working on this new graph. WDYT?
I wanted to be able to see how "healthy", from a number-of-contibutors perspective a package is.
Like, even if a package has hundreds of contributors, maybe those are all from years past, and the package is now basically only kept alive by one person, which isn't too good from a reliability/bus factor point of view
It uses the GitHub API, so only works for packages that have a github repo linked in the package metadata