-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix/ref: 1460 - remove trial start when org has no private repos #2787
Conversation
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 #2787 +/- ##
===========================================
+ Coverage 34.71% 98.45% +63.74%
===========================================
Files 852 873 +21
Lines 12564 12634 +70
Branches 3317 3317
===========================================
+ Hits 4361 12439 +8078
+ Misses 8094 191 -7903
+ Partials 109 4 -105
... and 563 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 #2787 +/- ##
===========================================
+ Coverage 15.58% 98.45% +82.86%
===========================================
Files 846 873 +27
Lines 12555 12634 +79
Branches 3317 3317
===========================================
+ Hits 1957 12439 +10482
+ Misses 10447 191 -10256
+ Partials 151 4 -147
... and 700 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 #2787 +/- ##
===========================================
+ Coverage 34.71% 98.45% +63.74%
===========================================
Files 852 873 +21
Lines 12564 12634 +70
Branches 3316 3316
===========================================
+ Hits 4361 12439 +8078
+ Misses 8094 191 -7903
+ Partials 109 4 -105
... and 563 files with indirect coverage changes
Continue to review full report in Codecov by Sentry.
|
Bundle ReportChanges will decrease total bundle size by 108 bytes ⬇️
|
Bundle ReportChanges will decrease total bundle size by 108 bytes ⬇️
|
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 #2787 +/- ##
========================================
+ Coverage 42.61 98.46 +55.85
========================================
Files 853 873 +20
Lines 12568 12634 +66
Branches 3317 3317
========================================
+ Hits 5355 12439 +7084
+ Misses 7137 191 -6946
+ Partials 76 4 -72
... and 480 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.
|
} | ||
}, | ||
onError: (e) => { | ||
onError: (e: any) => { |
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.
nit: Do you need the any
?
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.
Yeah we do, due to this setting I believe:
Line 18 in 8944577
"noImplicitAny": true, |
Description
Goal of this PR is to prevent the trial starting for a user when their organization that they are using to sign up for Codecov with has no private repos. The first commit of this PR has all the logic / tests that were updated for that aspect.
The rest of this PR is a simple TS conversion of one of the hooks called on the component, and a couple typos being fixed. Didn't want to blow up the PR any further for a bug fix so thought this was a decent stopping point.
Closes codecov/engineering-team#1460
Code Example
Manual Testing
Shown below are some screenshots of my local environment DB of the repos and owners tables being empty prior to creating a user object
The next screenshot is upon entering the "Which organization" page, which we can see pulls back
hasPrivateRepos: true
for the codecov organization, hinting that by the time the user reaches this page they should already have repos for the organizations they are a part of in their system.I have a feeling there are some race conditions / edge cases that may need extra consideration here, but for the majority of use cases (and the sake of this bug) I believe this fix should do the trick.
Screenshots
Link to Sample Entry
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.