Releases: suzuki-shunsuke/tfcmt
v3.2.1
Pull Requests | Issues | v3.2.0...v3.2.1
Bug Fixes
#253 Fix the bug that comments of tfcmt apply
patch comments of tfcmt plan
.
Follow up #245
Affected versions: v3.2.0
v3.2.0
Pull Requests | Issues | v3.1.0...v3.2.0
Features
#199 #245 #248 #249 Support patching comments of tfcmt plan
The option -patch
has been added to tfcmt plan
command.
tfcmt plan -patch -- terraform plan -no-color
And the configuration option plan_patch
has also been added.
plan_patch: true
The command line option -patch
takes precedence over configuration file option plan_patch
.
If you want to disable patching although plan_patch
is true, please set -patch=false
.
$ tfcmt plan -patch=false -- terraform plan -no-color
Motivation
By patching the comment instead of creating a new comment, you can keep the pull request comments clean.
Trouble shooting
If the comment isn't patched expectedly, please set -log-level=debug
.
$ tfcmt -log-level=debug plan -patch -- terraform plan -no-color
⚠️ Note to use tfcmt plan's patch option with github-comment hide
If you hide comments by github-comment hide and enable tfcmt plan's patch option,
you should be careful not to hide tfcmt plan's comments.
There are some ways to fix the problem.
- Stop using
github-comment hide
- Fix github-comment hide's condition and exclude tfcmt's comments from the target ofgithub-comment hide
- Run github-comment hide after tfcmt
v3.2.0-2
Pull Requests | Issues | v3.2.0-1...v3.2.0-2
Feature
#199 #249 Add the configuration option plan_patch
Follow up #245
Support configuring tfcmt plan's patch in configuration file
plan_patch: true
The command line option -patch
takes precedence over configuration file option plan_patch
.
If you want to disable patching although plan_patch
is true, please set -patch=false
.
$ tfcmt plan -patch=false -- terraform plan -no-color
v3.2.0-1
v3.2.0-0
Pull Requests | Issues | v3.1.1...v3.2.0-0
Features
#199 #245 Support patching the comment of tfcmt plan
The option -patch
has been added to tfcmt plan
command.
tfcmt plan -patch -- terraform plan -no-color
tfcmt apply
doesn't support patching. We think the comment of terraform apply
shouldn't be patched.
Motivation
By patching the comment instead of creating a new comment, you can keep the pull request comments clean.
Trouble shooting
If the comment isn't patched expectedly, please set -log-level=debug
.
$ tfcmt -log-level=debug plan -patch -- terraform plan -no-color
⚠️ Run github-comment hide
after running tfcmt plan -patch
If you hide comments using github-comment hide,
you have to run github-comment hide
after running tfcmt plan -patch
.
Otherwise, comments may be hidden before patching.
v3.1.1
Pull Requests | Issues | v3.1.0...v3.1.1
Bug Fixes
#241 Fix not removing stale labels if there are too many labels in the pull request
Thanks to kyontan.
tfcmt sets a pull request label.
When the result of terraform plan
is changed, tfcmt removes an old label and sets a new label.
But when the pull request has over 30 labels, tfcmt might not remove the old label.
This change fixes the bug.
Others
v3.1.1-0
Pull Requests | Issues | v3.1.0...v3.1.1-0
Bug Fixes
#241 Fix not removing stale labels if there are too many labels in the pull request
Thanks to kyontan.
tfcmt sets a pull request label.
When the result of terraform plan
is changed, tfcmt removes an old label and sets a new label.
But when the pull request has over 30 labels, tfcmt might not remove the old label.
This change fixes the bug.
Others
v3.1.0
Pull Requests | Issues | v3.0.1...v3.1.0
Feature
#227 #231 Omit too long text in the template function wrapCode
automatically
tfcmt fails to post a comment if the comment is too long because the maximum length of GitHub Comment is 65536.
422 Validation Failed [{Resource:IssueComment Field:data Code:unprocessable Message:Body is too long (maximum is 65536 characters)}]
To prevent the error, the template function wrapCode
checks the length of the text and if the length is over 60000, the text is omitted as the following.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# null_resource.foo will be created
+ resource "null_resource" "foo" {
+ id = (known after apply)
}
Plan: 1 to add, 0 to change, 0 to destroy.
null_resource.foo: Creating...
null_resource.foo: Creation complete after 0s [id=8966706083595703589]
# ...
# ... The maximum length of GitHub Comment is 65536, so the content is omitted by tfcmt.
# ...
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Others
#233 Update Go from v1.17.5 to v1.18.0
v3.1.0-0
Pull Requests | Issues | v3.0.0...v3.1.0-0
Feature
#227 #231 Omit too long text in the template function wrapCode
automatically
tfcmt fails to post a comment if the comment is too long because the maximum length of GitHub Comment is 65536.
422 Validation Failed [{Resource:IssueComment Field:data Code:unprocessable Message:Body is too long (maximum is 65536 characters)}]
To prevent the error, the template function wrapCode
checks the length of the text and if the length is over 60000, the text is omitted as the following.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# null_resource.foo will be created
+ resource "null_resource" "foo" {
+ id = (known after apply)
}
Plan: 1 to add, 0 to change, 0 to destroy.
null_resource.foo: Creating...
null_resource.foo: Creation complete after 0s [id=8966706083595703589]
# ...
# ... The maximum length of GitHub Comment is 65536, so the content is omitted by tfcmt.
# ...
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Others
#233 Update Go from v1.17.5 to v1.18.0
v3.0.1
Pull Request | v3.0.0...v3.0.1
Bug Fixes
#179 Fix the title when it fails to parse the result of terraform apply
AS IS
## Apply Result{{if .Vars.target}} ({{.Vars.target}}){{end}}
TO BE
{{template "apply_title" .}}