forked from openshift-knative/deviate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstructure.go
More file actions
58 lines (50 loc) · 2.27 KB
/
structure.go
File metadata and controls
58 lines (50 loc) · 2.27 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package config
import "github.com/openshift-knative/hack/pkg/dockerfilegen"
// Config for a deviate to operate.
type Config struct {
Upstream string `json:"upstream" valid:"required"`
Downstream string `json:"downstream" valid:"required"`
DryRun bool `json:"dryRun"`
GithubWorkflowsRemovalGlob string `json:"githubWorkflowsRemovalGlob" valid:"required"`
SyncLabels []string `json:"syncLabels" valid:"required"`
DockerfileGen dockerfilegen.Params `json:"dockerfileGen"`
ResyncReleases `json:"resyncReleases"`
Branches `json:"branches"`
Tags `json:"tags"`
Messages `json:"messages"`
}
// ResyncReleases holds configuration for resyncing past releases.
type ResyncReleases struct {
Enabled bool `json:"enabled"`
NumberOf int `json:"numberOf"`
}
// Tags holds configuration for tags.
type Tags struct {
Synchronize bool `json:"synchronize"`
RefSpec string `json:"refSpec" valid:"required"`
}
// Messages holds messages that are used to commit changes and create PRs.
type Messages struct {
TriggerCI string `json:"triggerCi" valid:"required"`
TriggerCIBody string `json:"triggerCiBody" valid:"required"`
ApplyForkFiles string `json:"applyForkFiles" valid:"required"`
ImagesGenerated string `json:"imagesGenerated" valid:"required"`
}
// Branches holds configuration for branches.
type Branches struct {
Main string `json:"main" valid:"required"`
ReleaseNext string `json:"releaseNext" valid:"required"`
SyncCi string `json:"syncCi"`
ReleaseTemplates `json:"releaseTemplates"`
Searches `json:"searches"`
}
// ReleaseTemplates contains templates for release names.
type ReleaseTemplates struct {
Upstream string `json:"upstream" valid:"required"`
Downstream string `json:"downstream" valid:"required"`
}
// Searches contains regular expressions used to search for branches.
type Searches struct {
UpstreamReleases string `json:"upstreamReleases" valid:"required"`
DownstreamReleases string `json:"downstreamReleases" valid:"required"`
}