Skip to content

Commit 99bf039

Browse files
authored
add update cooldown parameters to cli (#405)
1 parent 6bbfa63 commit 99bf039

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

internal/model/job.go

+10
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ type Job struct {
5151
CommitMessageOptions *CommitOptions `json:"commit-message-options" yaml:"commit-message-options,omitempty"`
5252
CredentialsMetadata []Credential `json:"credentials-metadata" yaml:"-"`
5353
MaxUpdaterRunTime int `json:"max-updater-run-time" yaml:"max-updater-run-time,omitempty"`
54+
UpdateCooldown *UpdateCooldown `json:"cooldown,omitempty" yaml:"cooldown,omitempty"`
5455
}
5556

5657
// Source is a reference to some source code
@@ -134,3 +135,12 @@ type CommitOptions struct {
134135
}
135136

136137
type Credential map[string]any
138+
139+
type UpdateCooldown struct {
140+
DefaultDays int `json:"default-days,omitempty" yaml:"default-days,omitempty"`
141+
SemverMajorDays int `json:"semver-major-days,omitempty" yaml:"semver-major-days,omitempty"`
142+
SemverMinorDays int `json:"semver-minor-days,omitempty" yaml:"semver-minor-days,omitempty"`
143+
SemverPatchDays int `json:"semver-patch-days,omitempty" yaml:"semver-patch-days,omitempty"`
144+
Include []string `json:"include,omitempty" yaml:"include,omitempty"`
145+
Exclude []string `json:"exclude,omitempty" yaml:"exclude,omitempty"`
146+
}

internal/model/job_test.go

+11
Original file line numberDiff line numberDiff line change
@@ -358,4 +358,15 @@ job:
358358
include-scope:
359359
security-updates-only: true
360360
repo-private: false
361+
cooldown:
362+
default-days: 3
363+
semver-major-days: 7
364+
semver-minor-days: 5
365+
semver-patch-days: 2
366+
include:
367+
- dependency-name-1
368+
- dependency-name-2
369+
exclude:
370+
- dependency-name-3
371+
- dependency-name-4
361372
`

0 commit comments

Comments
 (0)