Skip to content

Commit 3c9ebfd

Browse files
committed
provide default workflow config
1 parent f51fa2a commit 3c9ebfd

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

pkg/digger/digger_config.go

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ type WorkflowConfiguration struct {
1717
}
1818

1919
type DiggerConfig struct {
20-
Projects []Project `yaml:"projects"`
21-
AutoMerge bool `yaml:"auto_merge"`
22-
Workflows map[string]Workflow `yaml:"workflows"`
20+
Projects []Project `yaml:"projects"`
21+
AutoMerge bool `yaml:"auto_merge"`
22+
Workflows map[string]Workflow `yaml:"workflows"`
23+
CollectUsageData *bool `yaml:"collect_usage_data"`
2324
}
2425

2526
type Project struct {
@@ -103,6 +104,20 @@ func NewDiggerConfig(workingDir string) (*DiggerConfig, error) {
103104
[]string{},
104105
}},
105106
},
107+
Apply: &Stage{
108+
Steps: []Step{{
109+
Action: "init",
110+
ExtraArgs: []string{},
111+
}, {
112+
"apply",
113+
[]string{},
114+
}},
115+
},
116+
Configuration: &WorkflowConfiguration{
117+
OnPullRequestPushed: []string{"digger plan"},
118+
OnPullRequestClosed: []string{"digger unlock"},
119+
OnCommitToDefault: []string{"digger apply"},
120+
},
106121
}
107122
return config, nil
108123
}

0 commit comments

Comments
 (0)