-
Notifications
You must be signed in to change notification settings - Fork 2
feat(core): add releasesFactory to set releases list #475
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
Conversation
rm logs rm commit type add eng lang
….nodejs into feat-release
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #475 +/- ##
==========================================
- Coverage 54.62% 54.54% -0.08%
==========================================
Files 9 9
Lines 119 121 +2
Branches 10 10
==========================================
+ Hits 65 66 +1
- Misses 50 51 +1
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/dataLoaders.ts
Outdated
| import DataLoader from 'dataloader'; | ||
| import { Db, ObjectId } from 'mongodb'; | ||
| import { PlanDBScheme, UserDBScheme, WorkspaceDBScheme, ProjectDBScheme } from '@hawk.so/types'; | ||
| import { PlanDBScheme, UserDBScheme, WorkspaceDBScheme, ProjectDBScheme, ReleaseDBScheme } from '@hawk.so/types'; |
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.
redundant
src/models/releaseFactory.ts
Outdated
| return releases.map(release => ({ | ||
| ...release, | ||
| files: release.files?.map(file => { | ||
| const fileDetail = release.fileDetails?.find( | ||
| (detail: SourceMapFileChunk) => detail._id.toString() === file._id?.toString() | ||
| ); | ||
|
|
||
| return { | ||
| ...file, | ||
| size: fileDetail ? fileDetail.length : 0, | ||
| }; | ||
| }), | ||
| })); |
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.
this triple nesting seems wrong to me, can we optimize it somehow?
- rm redunant import - optimize triple nesting
| """ | ||
| Project releases | ||
| """ | ||
| releases: [Release!]! |
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.
why releases list is required in project, what if user never sent any releases?
No description provided.