diff --git a/cmd/dependabot/internal/cmd/update.go b/cmd/dependabot/internal/cmd/update.go index 2fff084..aaf7762 100644 --- a/cmd/dependabot/internal/cmd/update.go +++ b/cmd/dependabot/internal/cmd/update.go @@ -74,6 +74,7 @@ var updateCmd = &cobra.Command{ AllowedUpdates: []model.Allowed{{ UpdateType: "all", }}, + DependencyGroups: nil, Dependencies: nil, ExistingPullRequests: [][]model.ExistingPR{}, IgnoreConditions: []model.Condition{}, diff --git a/internal/model/job.go b/internal/model/job.go index 879b291..3017c9a 100644 --- a/internal/model/job.go +++ b/internal/model/job.go @@ -4,6 +4,7 @@ package model type Job struct { PackageManager string `json:"package-manager" yaml:"package-manager"` AllowedUpdates []Allowed `json:"allowed-updates" yaml:"allowed-updates,omitempty"` + DependencyGroups []Group `json:"dependency-groups" yaml:"dependency-groups,omitempty"` Dependencies []string `json:"dependencies" yaml:"dependencies,omitempty"` ExistingPullRequests [][]ExistingPR `json:"existing-pull-requests" yaml:"existing-pull-requests,omitempty"` Experiments Experiment `json:"experiments" yaml:"experiments,omitempty"` @@ -45,6 +46,11 @@ type Allowed struct { UpdateType string `json:"update-type,omitempty" yaml:"update-type,omitempty"` } +type Group struct { + GroupName string `json:"name,omitempty" yaml:"name,omitempty"` + Rules []string `json:"rules,omitempty" yaml:"rules,omitempty"` +} + type Condition struct { DependencyName string `json:"dependency-name" yaml:"dependency-name"` Source string `json:"source,omitempty" yaml:"source,omitempty"` diff --git a/internal/model/job_test.go b/internal/model/job_test.go index 0fe52fb..72c10f5 100644 --- a/internal/model/job_test.go +++ b/internal/model/job_test.go @@ -335,6 +335,9 @@ job: allowed-updates: - dependency-type: direct update-type: all + dependency-groups: + - name: npm + rules: ["npm", "@npmcli*"] credentials-metadata: - type: git_source host: github.com