-
Notifications
You must be signed in to change notification settings - Fork 25
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
chore: Migrate useCommitPageData to TSQ V5 #3537
chore: Migrate useCommitPageData to TSQ V5 #3537
Conversation
Bundle ReportChanges will decrease total bundle size by 17.47kB (-0.1%) ⬇️. This is within the configured threshold ✅ Detailed changes
|
Bundle ReportChanges will decrease total bundle size by 17.47kB (-0.1%) ⬇️. This is within the configured threshold ✅ Detailed changes
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #3537 +/- ##
==========================================
- Coverage 98.91% 98.90% -0.02%
==========================================
Files 806 807 +1
Lines 14443 14476 +33
Branches 4104 4116 +12
==========================================
+ Hits 14287 14318 +31
- Misses 149 151 +2
Partials 7 7
... and 20 files with indirect coverage changes
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #3537 +/- ##
==========================================
- Coverage 98.91% 98.90% -0.02%
==========================================
Files 806 807 +1
Lines 14443 14476 +33
Branches 4104 4116 +12
==========================================
+ Hits 14287 14318 +31
- Misses 149 151 +2
Partials 7 7
... and 20 files with indirect coverage changes
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #3537 +/- ##
==========================================
- Coverage 98.91% 98.90% -0.02%
==========================================
Files 806 807 +1
Lines 14443 14476 +33
Branches 4097 4109 +12
==========================================
+ Hits 14287 14318 +31
- Misses 149 151 +2
Partials 7 7
... and 20 files with indirect coverage changes
Continue to review full report in Codecov by Sentry.
|
✅ Deploy preview for gazebo ready!Previews expire after 1 month automatically.
|
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.
Looks good!
src/pages/CommitDetailPage/CommitCoverage/CommitCoverage.test.jsx
Outdated
Show resolved
Hide resolved
provider, | ||
owner, | ||
repo, | ||
commitId: commitSha, |
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.
Unrelated question - Do you happen to know how pervasively we allow sha and id to be interchanged like it is here?
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.
I don't think it's too bad, but it is a symptom of the API argument for commit sha's being id
, see:
query CommitPageData($owner: String!, $repo: String!, $commitId: String!) {
owner(username: $owner) {
isCurrentUserPartOfOrg
repository(name: $repo) {
__typename
... on Repository {
private
bundleAnalysisEnabled
coverageEnabled
commit(id: $commitId) { # <- should be sha imo
commitid
compareWithParent {
__typename
}
bundleAnalysis {
bundleAnalysisCompareWithParent {
__typename
}
}
}
}
... on NotFoundError {
message
}
... on OwnerNotActivatedError {
message
}
}
}
}
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.
Gotcha, yeah I guess the api accepts both as the key. Thanks for looking at it!
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #3537 +/- ##
==========================================
- Coverage 98.91% 98.90% -0.02%
==========================================
Files 806 807 +1
Lines 14443 14476 +33
Branches 4104 4109 +5
==========================================
+ Hits 14287 14318 +31
- Misses 149 151 +2
Partials 7 7
... and 20 files with indirect coverage changes
Continue to review full report in Codecov by Sentry.
|
Description
This PR updates the
useCommitPageData
hook toCommitPageDataQueryOpts
following along with the new style of writing data fetching utils.Ticket: codecov/engineering-team#2966
Notable Changes
useCommitPageData
toCommitPageDataQueryOpts