-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Comments truncated even when writing to file which has no size limit #1308
Comments
Thank you for your feedback! I think we can change wrapCode function if tfcmt writes the result to a local file. tfcmt/pkg/notifier/localfile/plan.go Line 55 in 898a491
tfcmt/pkg/terraform/template.go Line 170 in 898a491
|
Hmm, this depends on how to use a local file. |
Awesome, thanks for the quick reply! If other people put together multiple results in one comment I think they might need to do truncation anyway in case the individual files do not exceed the limit but the combined one does? In that case an option would not help much (but that would be the case with the current implementation and with the one in the PR) |
Thanks for picking this up, are there any updates on this? Anything I can still help out with? |
With the |
Feature Overview
Currently the wrapCode function truncates the contents to the github comment size limit, even when writing the output to a local file. Files have no size limit of course so it would be great if it (optionally configurable) would not truncate when writing to a file.
An approach would be to just add a boolean parameter to wrapCode,
truncate
to indicate if truncation should take place, this can be passed as true when using the github notifier but false when using the localfile notifier, implementation would be fairly trivial. However, this would not be backwards compitable with people who have written their own templates with the wrapCode function as they would need to add the truncate param. I'm not sure of another elegant way to implement its.If welcomed I'd like to create a PR to solve this!
Why is the feature needed?
We use writing to a local file to get around the github comment size limit but it now is still truncated
Example Code
No response
note
No response
The text was updated successfully, but these errors were encountered: