Breaking Change
#62 the template variable Body
is removed
#67 Embed github-comment metadata to support hide comments with github-comment
the template variable Body
is removed
Please replace Body
into CombinedOutput
.
CombinedOutput
includes both the standard output and standard error output.
Embed github-comment metadata to support hide comments with github-comment
The following metadata is embedded into comment.
<!-- github-comment: {"Command":"plan","JobID":"aaa","JobName":"build","PRNumber":69,"Program":"tfcmt","SHA1":"xxx","Vars":{}} -->
We can hide comments with github-comment's hide command.
Feature
#63 improve default template
#61 support to get a pull request number from CI_INFO_PR_NUBER
#56 #59 add log level option and log.level configuration and output structured log with logrus
#55 #58 add command-line options about CI
improve default template
Add ✅ and ❌ to comment title to make the result clear
ex.
AS IS
## Apply Result
TO BE
## :x: Apply Result
support to get a pull request number from CI_INFO_PR_NUBER
ci-info is a CLI tool to get CI related information, and the environment variable CI_INFO_PR_NUMBER
is set via ci-info by default.
If the pull request number can't bet gotten but CI_INFO_PR_NUMBER
is being set, CI_INFO_PR_NUMBER
is used.
add log level option and log.level configuration and output structured log with logrus
ex.
$ tfcmt --log-level debug plan -- terraform plan
---
log:
level: debug
add command-line options about ci
- -owner
- -repo
- -pr
- -sha
- -build-url
mercari/tfnotify gets these parameters from only environment variables, so we don't use mercari/tfnotify on the platform which mercari/tfnotify doesn't support.
On the other hand, tfcmt supports to specify these parameters by command-line options, so we can use tfcmt anywhere.
ex.
$ tfcmt -owner suzuki-shunsuke -repo tfcmt -pr 3 -- terraform plan
Fix
#62 parse error result properly
parse error result properly
tfcmt
parsed only the standard output and ignored standard error output, so it failed to parse the error result.
ex.
$ tfcmt apply -- terraform apply -auto-approve
AS IS
TO BE