Skip to content

Commit

Permalink
Introduce dependency-groups (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishnha authored Apr 10, 2023
1 parent 74a0d67 commit 5c42fd1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/dependabot/internal/cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ var updateCmd = &cobra.Command{
AllowedUpdates: []model.Allowed{{
UpdateType: "all",
}},
DependencyGroups: nil,
Dependencies: nil,
ExistingPullRequests: [][]model.ExistingPR{},
IgnoreConditions: []model.Condition{},
Expand Down
6 changes: 6 additions & 0 deletions internal/model/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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"`
Expand Down
3 changes: 3 additions & 0 deletions internal/model/job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5c42fd1

Please sign in to comment.