-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
34 lines (33 loc) · 3.14 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package config
// Configuration represents GitLab's project configuration supported.
//
// Some fields have type map[string]interface{} because they are passed almost as-is
// to GitLab API. This allows for potential customization in behavior beyond what
// is currently supported by this package.
//
// All fields with prefix "comment:" are moved into YAML comments before they are
// written out. Similarly, fields which have "Comment" suffix are moved into
// YAML comments and are not used for project configuration.
type Configuration struct {
Project map[string]interface{} `json:"project" yaml:"project"`
Avatar *string `json:"avatar" yaml:"avatar"`
SharedWithGroups []map[string]interface{} `json:"shared_with_groups" yaml:"shared_with_groups"`
SharedWithGroupsComment string `json:"comment:shared_with_groups,omitempty" yaml:"comment:shared_with_groups,omitempty"`
Approvals map[string]interface{} `json:"approvals" yaml:"approvals"`
ApprovalRules []map[string]interface{} `json:"approval_rules" yaml:"approval_rules"`
ApprovalRulesComment string `json:"comment:approval_rules,omitempty" yaml:"comment:approval_rules,omitempty"`
PushRules map[string]interface{} `json:"push_rules" yaml:"push_rules"`
PushRulesComment string `json:"comment:push_rules,omitempty" yaml:"comment:push_rules,omitempty"`
ForkedFromProject *int `json:"forked_from_project" yaml:"forked_from_project"`
ForkedFromProjectComment string `json:"comment:forked_from_project,omitempty" yaml:"comment:forked_from_project,omitempty"`
Labels []map[string]interface{} `json:"labels" yaml:"labels"`
LabelsComment string `json:"comment:labels,omitempty" yaml:"comment:labels,omitempty"`
ProtectedBranches []map[string]interface{} `json:"protected_branches" yaml:"protected_branches"`
ProtectedBranchesComment string `json:"comment:protected_branches,omitempty" yaml:"comment:protected_branches,omitempty"`
ProtectedTags []map[string]interface{} `json:"protected_tags" yaml:"protected_tags"`
ProtectedTagsComment string `json:"comment:protected_tags,omitempty" yaml:"comment:protected_tags,omitempty"`
Variables []map[string]interface{} `json:"variables" yaml:"variables"`
VariablesComment string `json:"comment:variables,omitempty" yaml:"comment:variables,omitempty"`
PipelineSchedules []map[string]interface{} `json:"pipeline_schedules" yaml:"pipeline_schedules"`
PipelineSchedulesComment string `json:"comment:pipeline_schedules,omitempty" yaml:"comment:pipeline_schedules,omitempty"`
}