-
Notifications
You must be signed in to change notification settings - Fork 415
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
feat: Track leads to Hubspot #3473
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
try: | ||
import re2 as re | ||
|
||
logger.info("Using re2 library for regex.") | ||
except ImportError: | ||
logger.warning("Unable to import re2. Falling back to re.") | ||
import re |
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.
This import logic was to mirror the functionality of the existing pipedrive code which had this way of importing re
.
Uffizzi Preview |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3473 +/- ##
==========================================
- Coverage 95.91% 95.86% -0.06%
==========================================
Files 1092 1097 +5
Lines 33991 34136 +145
==========================================
+ Hits 32601 32723 +122
- Misses 1390 1413 +23 ☔ View full report in Codecov by Sentry. |
Should we remove the pipedrive code here too? |
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.
Approved with one minor typo fix.
Co-authored-by: Matthew Elwell <matthew.elwell@flagsmith.com>
According to @matthewelwell we're holding onto the pipedrive code for now since there is still a need for a bit. |
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingdocs/
if required so people know about the feature!Changes
Upon a user being successfully added to a new organisation we trigger a task where the user's basic info (first and last name as well as email) are associated with the organisation in Hubspot via their API. The lead tracking implementation was partially mirrored with the existing Pipedrive implementation, including matching leads based off of domain names or regexes as well as using the same abstract base class
LeadTracker
although modelling the responses in the same way didn't seem necessary to get the functionality in place.How did you test this code?
Tested the actual API responses with a locally set access token and then moved the relevant responses into mocked requests for the three unit tests that cover the various edge cases.