-
Notifications
You must be signed in to change notification settings - Fork 31
Improvements to Google Parser #375
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
base: develop
Are you sure you want to change the base?
Improvements to Google Parser #375
Conversation
glennmatthews
left a comment
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.
Thanks for the PR, looks solid at a quick readthrough. Would you mind adding a changelog fragment?
|
Thanks, added changelog fragment |
jvanderaa
left a comment
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.
Looking good with just one spelling in a comment suggestion.
| match = re.search(r" - Reference (.*)$", summary) | ||
| data["summary"] = summary | ||
| data["maintenance_id"] = match[1] | ||
| # Google sometimes send notifications without End Time specificed |
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.
| # Google sometimes send notifications without End Time specificed | |
| # Google sometimes send notifications without End Time specified |
Currently Google parser statically sets status to CONFIRMED for all maintenances. But Google sends emails with multiple statuses (Scheduled, Completed, Canceled). To cover this:
statusparsing to subject parser (HTML status parsing is cumbersome because 'Scheduled' status maintenances have no status in the main div, only 'Completed' and 'Canceled' do (and the status is in a separate element, so current HTML parsing logic was failing on those)summaryandmaintenance_idparsing to subject parser for simplicityAlso Google sometimes send maintenances without any End Date specified at all, so to cover this:
Also added multiple tests to cover both parsers and e2e functionality as well.