Skip to content
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: move verification emails to Dotdigital #2277

Merged
merged 47 commits into from
Apr 10, 2024

Conversation

evemartin
Copy link
Contributor

@evemartin evemartin commented Mar 28, 2024

Description

How Has This Been Tested?

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have linked this PR to a ZenHub Issue.

This change is Reviewable

Copy link
Contributor

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 6 of 13 files at r1, all commit messages.
Reviewable status: 6 of 13 files reviewed, 3 unresolved discussions (waiting on @evemartin)


.github/workflows/ci.yml line 12 at r1 (raw file):

    env:
      LANG: C.UTF-8
      DOTDIGITAL_AUTH: ${{ secrets.DOTDIGITAL_AUTH }}

We don't want this here, instead it should be added to app_settings.py in common - this is where the env vars from the appengine repo get pulled in.
You'll also need to add it in portal_test_settings.py so the tests can run (I think).


cfl_common/common/helpers/emails.py line 7 at r1 (raw file):

from uuid import uuid4

from django.urls import reverse

Please organise your imports 🙂


cfl_common/common/helpers/emails.py line 273 at r1 (raw file):

        users_with_email = User.objects.filter(email=new_email)

        send_dotdigital_email(1551600, [user.new_user.email], personalization_values={"NEW_EMAIL_ADDRESS": new_email})

(Check out the thread in cfl-dev-team for more info if you want) TL;DR
We want to store the campaign IDs in a central file so they are 1) reusable and 2) not scattered around in the code.
Please create a dict in mail.py where values are the campaign IDs and the keys are a string so we know which campaign the ID refers to. Then call the dict in this file (and wherever else you might need it)

@evemartin evemartin self-assigned this Apr 9, 2024
Copy link
Contributor Author

@evemartin evemartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 3 of 18 files reviewed, 3 unresolved discussions (waiting on @evemartin and @faucomte97)


cfl_common/common/helpers/emails.py line 7 at r1 (raw file):

Previously, faucomte97 (Florian Aucomte) wrote…

Please organise your imports 🙂

Done.


cfl_common/common/helpers/emails.py line 273 at r1 (raw file):

Previously, faucomte97 (Florian Aucomte) wrote…

(Check out the thread in cfl-dev-team for more info if you want) TL;DR
We want to store the campaign IDs in a central file so they are 1) reusable and 2) not scattered around in the code.
Please create a dict in mail.py where values are the campaign IDs and the keys are a string so we know which campaign the ID refers to. Then call the dict in this file (and wherever else you might need it)

Done.


.github/workflows/ci.yml line 12 at r1 (raw file):

Previously, faucomte97 (Florian Aucomte) wrote…

We don't want this here, instead it should be added to app_settings.py in common - this is where the env vars from the appengine repo get pulled in.
You'll also need to add it in portal_test_settings.py so the tests can run (I think).

Done.

Copy link
Contributor

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 13 files at r1, 12 of 12 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @evemartin)


portal/tests/test_independent_student.py line 273 at r2 (raw file):

        errors = page.has_login_failed("independent_student_login_form", INVALID_LOGIN_MESSAGE)
        assert page.has_login_failed("independent_student_login_form", INVALID_LOGIN_MESSAGE)
        print(errors)

Remove print 🙂

Copy link
Contributor Author

@evemartin evemartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 15 of 20 files reviewed, 1 unresolved discussion (waiting on @evemartin and @faucomte97)


portal/tests/test_independent_student.py line 273 at r2 (raw file):

Previously, faucomte97 (Florian Aucomte) wrote…

Remove print 🙂

Removed :)

Copy link
Contributor

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 4 of 5 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @evemartin)

a discussion (no related file):
Run Black formatter please :)


Copy link
Contributor Author

@evemartin evemartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 10 of 49 files reviewed, 1 unresolved discussion (waiting on @evemartin and @faucomte97)

a discussion (no related file):

Previously, faucomte97 (Florian Aucomte) wrote…

Run Black formatter please :)

I've run it and also removed the unused imports!


Copy link
Contributor

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 39 of 39 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @evemartin)

Copy link
Contributor

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @evemartin)

@evemartin evemartin enabled auto-merge (squash) April 10, 2024 12:46
Copy link
Contributor Author

@evemartin evemartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

:lgtm:

Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (waiting on @evemartin)

Copy link
Contributor Author

@evemartin evemartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 13 files at r1, 7 of 12 files at r2, 1 of 5 files at r3, 39 of 39 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @evemartin)

Copy link
Contributor

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @evemartin)

@faucomte97 faucomte97 merged commit 19b96d6 into master Apr 10, 2024
5 checks passed
@faucomte97 faucomte97 deleted the move-verification-emails-to-dotdigital branch April 10, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants