-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add customer intent to Users type and SaveTermsAgreement mutation #393
Add customer intent to Users type and SaveTermsAgreement mutation #393
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Changes have been made to critical files, which contain lines commonly executed in production. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #393 +/- ##
======================================
Coverage 95.76 95.76
======================================
Files 752 752
Lines 17096 17240 +144
======================================
+ Hits 16371 16509 +138
- Misses 725 731 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
graphql_api/types/mutation/save_terms_agreement/save_terms_agreement.graphql
Show resolved
Hide resolved
codecov_auth/commands/owner/interactors/save_terms_agreement.py
Outdated
Show resolved
Hide resolved
@@ -48,6 +57,7 @@ def execute(self, input): | |||
business_email=input.get("businessEmail"), | |||
terms_agreement=input.get("termsAgreement"), | |||
marketing_consent=input.get("marketingConsent"), |
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 this one is weird 😂 we're not using it, @RulaKhaled pinging you since you were the last to work on this, do we know what's the intended use for this?
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.
We used to use this to decide if user signs up for marketing consent or not, to decide if we should opt user in for emails
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.
im not sure if we use it anymore though
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.
Might be worth following up with them, not a blocker for this PR though
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.
Not sure if we followed up here but just pinging in case we haven't and we want to
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #393 +/- ##
=======================================
Coverage 96.08% 96.08%
=======================================
Files 637 637
Lines 16589 16598 +9
=======================================
+ Hits 15939 15948 +9
Misses 650 650
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
@@ Coverage Diff @@
## main #393 +/- ##
=======================================
Coverage 96.08% 96.08%
=======================================
Files 637 637
Lines 16589 16598 +9
=======================================
+ Hits 15939 15948 +9
Misses 650 650
Flags with carried forward coverage won't be shown. Click here to find out more.
|
graphql_api/types/mutation/save_terms_agreement/save_terms_agreement.graphql
Outdated
Show resolved
Hide resolved
55658aa
to
1a33582
Compare
1a33582
to
1b0fa70
Compare
064a890
to
6ae5d70
Compare
6ae5d70
to
04a0e42
Compare
codecov_auth/commands/owner/interactors/save_terms_agreement.py
Outdated
Show resolved
Hide resolved
codecov_auth/commands/owner/interactors/save_terms_agreement.py
Outdated
Show resolved
Hide resolved
graphql_api/types/mutation/save_terms_agreement/save_terms_agreement.graphql
Outdated
Show resolved
Hide resolved
@@ -22,12 +23,20 @@ class SaveTermsAgreementInteractor(BaseInteractor): | |||
def validate(self, input: TermsAgreementInput): | |||
if input.terms_agreement is None: | |||
raise ValidationError("Terms of agreement cannot be null") | |||
if input.customer_intent and input.customer_intent not in [ | |||
"Business", |
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.
Any reason why we don't lowercase/uppercase the input to follow what we have in the DB?
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 am validating to keep parity with the choices here.
Purpose/Motivation
What is the feature? Why is this being done?
Following up from #390, updates the SaveTermsAgreement to read the customer intent value from the front end. It should always be provided.
Additionally, add a resolver to fetch the intent on the User object.
Links to relevant tickets
This closes codecov/engineering-team#1090
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.