-
Notifications
You must be signed in to change notification settings - Fork 26
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
ref: Refactor useCommits to use typescript #2506
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## main #2506 +/- ##
=======================================
Coverage 98.25% 98.25%
=======================================
Files 784 784
Lines 10004 10020 +16
Branches 2546 2500 -46
=======================================
+ Hits 9829 9845 +16
Misses 173 173
Partials 2 2
Continue to review full report in Codecov by Sentry.
|
Codecov Report
@@ Coverage Diff @@
## main #2506 +/- ##
=======================================
Coverage 98.25% 98.25%
=======================================
Files 784 784
Lines 10004 10020 +16
Branches 2495 2502 +7
=======================================
+ Hits 9829 9845 +16
Misses 173 173
Partials 2 2
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2506 +/- ##
=======================================
Coverage 98.25% 98.25%
=======================================
Files 784 784
Lines 10004 10020 +16
Branches 2497 2546 +49
=======================================
+ Hits 9829 9845 +16
Misses 173 173
Partials 2 2
Continue to review full report in Codecov by Sentry.
|
✅ Deploy Preview for gazebo-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2506 +/- ##
=====================================
Coverage 98.25 98.25
=====================================
Files 784 784
Lines 10004 10020 +16
Branches 2527 2502 -25
=====================================
+ Hits 9829 9845 +16
Misses 173 173
Partials 2 2
Continue to review full report in Codecov by Sentry.
|
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.
Few comments
src/services/commits/useCommits.tsx
Outdated
totals { | ||
coverage | ||
} | ||
parent { | ||
totals { | ||
coverage | ||
} | ||
} |
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.
m
: Can you update the two coverage
fields here to be percentCovered
instead of having to do a bunch of work you can just alias them, just so we're not using deprecated fields, something like:
totals {
coverage: percentCovered
}
parent {
totals {
coverage: percentCovered
}
}
@@ -39,6 +39,6 @@ export const useTabsCounts = () => { | |||
componentsCount: compareWithBase?.componentComparisonsCount, | |||
indirectChangesCount: compareWithBase?.indirectChangedFilesCount, | |||
directChangedFilesCount: compareWithBase?.directChangedFilesCount, | |||
commitsCount: commitsData?.commitsCount, | |||
commitsCount: commitsData?.pages[0]?.commitsCount, |
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.
l
: Just so we don't have an error here if the list is empty you can do optional chaining with index accessing:
commitsCount: commitsData?.pages?.[0]?.commitsCount,
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.
Thanks for those quick fixes, approved ✅
Description
Refactoring useCommits hook to ease the refactor of commits tables
Notable Changes
Screenshots
nothing visual changes
closes #2505
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.