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
Write to a local md file instead of git #194
Comments
Could you explain why this feature is needed? |
Debugging is one reason. I did actually strip out the "pr commenter" to test this first. But another reason, the one I'm solving in my particular case, is the script that executes my terraform doesn't have knowledge of the PR that triggered the execution. By saving a file, i'd be able to send it or read it later when another script might know where to comment. |
In my case it could be useful to have summary somewhere. Currently, I need to detect if any resource is going to change. So I parse all output for the phrase "Your infrastructure matches the configuration." is it possible to export results of -
to the environment variables to use them later in the CI? |
Now that GitHub has launched job summaries, it would be nice to post the markdown as |
#654 was merged and I published a prerelease version Document: https://suzuki-shunsuke.github.io/tfcmt/output-file Please try v4.2.0-2 and give me your feedback. |
It's fine for me. No problem to use it via my CI. Just, I use it to publish MD content to GITHUB_STEP_SUMMARY, and the "CI LINK" is not necessary for me but it's ok. |
Thank you for your feedback.
I see. It makes sense but I think there are usecases that e.g. plan:
template: |
{{if and .Link (ne .NotifierType "localfile")}}[CI link]({{.Link}}){{end}} https://pkg.go.dev/text/template But this is just an idea and isn't mandatory. |
I think that using the configuration file to specify not to use the "CI Link" is sufficient, as the existing configuration allows for it. Additionally, in my opinion, it is not necessary to introduce the feature that would support the type of notifier. |
Finally, having the type of Notifier available in the config file could be a plus... We could use the same config file for both Github comment and markdown file. |
Released. https://github.com/suzuki-shunsuke/tfcmt/releases/tag/v4.2.0 @NikitaCOEUR Thank you for your contribution! |
It would be nice if the tool can have an option to fill in the
plan
orapply
template to a local file instead of forcing this script to post directly to a PR. I would guess it could be an option of the commands, like:The text was updated successfully, but these errors were encountered: