Skip to content

Commit d71d2cf

Browse files
Nguyen, TungNguyen, Tung
Nguyen, Tung
authored and
Nguyen, Tung
committed
type should be bool rather than string
1 parent 7f62201 commit d71d2cf

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

client/pipeline.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ type Trigger struct {
5858
}
5959

6060
type TriggerOptions struct {
61-
NoCache string `json:"noCache,omitempty"`
62-
NoCfCache string `json:"noCfCache,omitempty"`
63-
ResetVolume string `json:"resetVolume,omitempty"`
64-
EnableNotifications string `json:"enableNotifications,omitempty"`
61+
NoCache bool `json:"noCache,omitempty"`
62+
NoCfCache bool `json:"noCfCache,omitempty"`
63+
ResetVolume bool `json:"resetVolume,omitempty"`
64+
EnableNotifications bool `json:"enableNotifications,omitempty"`
6565
}
6666

6767
type RuntimeEnvironment struct {

codefresh/resource_pipeline.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -693,10 +693,10 @@ func mapResourceToPipeline(d *schema.ResourceData) *cfClient.Pipeline {
693693
codefreshTrigger.SetVariables(variables)
694694
if _, ok := d.GetOk(fmt.Sprintf("spec.0.trigger.%v.options", idx)); ok {
695695
options := cfClient.TriggerOptions{
696-
NoCache: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.no_cache", idx)).(string),
697-
NoCfCache: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.no_cf_cache", idx)).(string),
698-
ResetVolume: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.reset_volume", idx)).(string),
699-
EnableNotifications: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.enable_notifications", idx)).(string),
696+
NoCache: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.no_cache", idx)).(bool),
697+
NoCfCache: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.no_cf_cache", idx)).(bool),
698+
ResetVolume: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.reset_volume", idx)).(bool),
699+
EnableNotifications: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.enable_notifications", idx)).(bool),
700700
}
701701
codefreshTrigger.Options = &options
702702
}

0 commit comments

Comments
 (0)