Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

email.templates: make 'text' template optional#46085

Merged
bobheadxi merged 3 commits intomainfrom
email-optional-text
Jan 3, 2023
Merged

email.templates: make 'text' template optional#46085
bobheadxi merged 3 commits intomainfrom
email-optional-text

Conversation

@bobheadxi
Copy link
Member

@bobheadxi bobheadxi commented Jan 3, 2023

Uses https://github.com/k3a/html2text to automatically convert HTML templates to plain text if one is not provided in email.templates site configuration, thus making the text field optional.

Also removes unused template functions for Markdown/HTML conversions - I don't think we should encourage the use of these, and there are no mentions of them anywhere. User-configurable templates are new and unreleased as well, so this isn't a breaking change.

Follow-up to https://github.com/sourcegraph/sourcegraph/pull/45671#discussion_r1054110770.
Part of https://github.com/sourcegraph/customer/issues/1719.

Test plan

Unit tests

@bobheadxi bobheadxi requested review from a team and unknwon January 3, 2023 18:23
@cla-bot cla-bot bot added the cla-signed label Jan 3, 2023
Copy link
Member

@michaellzc michaellzc left a comment

Choose a reason for hiding this comment

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

lgtm

@bobheadxi bobheadxi merged commit 7c7776c into main Jan 3, 2023
@bobheadxi bobheadxi deleted the email-optional-text branch January 3, 2023 19:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants