-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add custom comment templating support #2647
Conversation
@pseudomorph Please add some docs on how to use this |
@jamengual - Thanks for your response. I'll try to work on this later today. I forked from @ribejara-te 's PR since this is a feature I'd really like to see. I see the pre-release was already cut. Is there any chance of getting it added in to the upcoming release if I can address the documentation, or would it need to wait until a future release? |
@pseudomorph we do multiple pre-releases. We will review this before the next pre-release. |
we will do another prerelease in like 1-2 weeks so we can add this in. |
@pseudomorph could you add a test for a custom template as well? |
- Add test for custom template
I've added a flag/config parameter for setting where the custom template directory is. Added a single test to validate that a custom template gets rendered. Will try to get to the documentation in the within the next day. |
I noticed that some of the templates can be made more DRY. This is more of an optimization, and might not be an issue for now. It might take another day or two to get to that if it's desired. Also, website_link_check is failing, and I'm not sure why. |
Yeah I mostly kept templates as-is, only DRYing what I saw was easy, hoping we would get to further optimize them down the line. Feel free to do so. 🙂 Btw thanks for pushing this down the finish line, really appreciated. |
Markdown template overrides may be specified either in individual files, or all together in a single file. All template | ||
override files _must_ have the `.tmpl` extension, otherwise they will not be parsed. | ||
|
||
Markdown templates which may have overrides can be found [here](https://github.com/runatlantis/atlantis/tree/master/server/events/templates) |
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 link fails for now but I think it will resolve once this gets merged. We can probably ignore this branch
failure for now.
https://github.com/runatlantis/atlantis/tree/master/server/events/templates
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.
cc: @jamengual @chenrui333 please give this a second review
Thank you! |
Thank you for the contribution! |
Thank you all for your help! |
* added custom templates support * made default templates DRY * Change init to anonymous function. * Initialize anonymous function inside var * - Add flag/cfg param for custom template dir - Add test for custom template * Add documentation. * Address PR comments. Co-authored-by: Ricard Bejarano <ribejara@thousandeyes.com>
This PR is a fork of the changes from #2481 , and addresses linting errors.
#2541 (comment)
Closes #1026