-
Notifications
You must be signed in to change notification settings - Fork 504
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
Allow customizing notification templates per project #3369
Allow customizing notification templates per project #3369
Conversation
This looks great @vindex10! As this approach fallbacks gracefully, I see no reason why it can't be merged. Thanks for the contribution. As far as documentation, we don't currently have a good space for something like this. Maybe we could create new page for "Messaging" related settings here: https://netflix.github.io/dispatch/docs/administration/settings ? |
Sounds good! I could also include information about the recent markdown enhancement in there :) |
@vindex10 can you run |
Yes, of course, i will change this together with adding the page to the docs! |
Could you rerun the playwright tests please? They seem to have failed because of the network problem |
I think this looks good @vindex10 if you're happy with it I can merge it in. |
I definitely am, @kevgliss :) please do! Thank you! |
Thanks! This will be added in our next release. |
* project specific templates
There is a way to have customizable templates for dispatch today, by mounting a volume with a customized templates dir as part of the docker compose:
This approach does allow to customize the templates "deployment"-wide.
In this PR I suggest a small extension of this functionality. You can create a folder per project (identified by project id):
This will be used at the first place if exists, otherwise will gracefully fall back to the default template like "/templates/base.mjml".
I was a bit afraid to use "slug" of the project name, because this requires more careful work on escaping system paths and making sure we don't expose something by engineering a weird project name. This can be expanded in future though, by introducing another subdir "templates/project_slug/<project_slug>".