From 13b3b64b1444d528db49d60a99310bcd45993a52 Mon Sep 17 00:00:00 2001 From: Shunsuke Suzuki Date: Fri, 4 Oct 2024 10:18:34 +0900 Subject: [PATCH] feat(plan): bind some environment variables to options (#1425) --- pkg/cli/app.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkg/cli/app.go b/pkg/cli/app.go index 28234c72..c805698d 100644 --- a/pkg/cli/app.go +++ b/pkg/cli/app.go @@ -74,16 +74,19 @@ $ tfcmt [] plan [-patch] [-skip-no-changes] -- terraform plan [< Action: cmdPlan, Flags: []cli.Flag{ &cli.BoolFlag{ - Name: "patch", - Usage: "update an existing comment instead of creating a new comment. If there is no existing comment, a new comment is created.", + Name: "patch", + Usage: "update an existing comment instead of creating a new comment. If there is no existing comment, a new comment is created.", + EnvVars: []string{"TFCMT_PLAN_PATCH"}, }, &cli.BoolFlag{ - Name: "skip-no-changes", - Usage: "If there is no change tfcmt updates a label but doesn't post a comment", + Name: "skip-no-changes", + Usage: "If there is no change tfcmt updates a label but doesn't post a comment", + EnvVars: []string{"TFCMT_SKIP_NO_CHANGES"}, }, &cli.BoolFlag{ - Name: "ignore-warning", - Usage: "If skip-no-changes is enabled, comment is posted even if there is a warning. If skip-no-changes is disabled, warning is removed from the comment.", + Name: "ignore-warning", + Usage: "If skip-no-changes is enabled, comment is posted even if there is a warning. If skip-no-changes is disabled, warning is removed from the comment.", + EnvVars: []string{"TFCMT_IGNORE_WARNING"}, }, &cli.BoolFlag{ Name: "disable-label",