Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add groups to config #41

Merged
merged 6 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
go test -vet=off -count=1 ./... -coverprofile cover.out
go tool cover -html cover.out -o cover.html
- name: Archive code coverage report
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: cover.html
40 changes: 25 additions & 15 deletions internal/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ type UpdateDefaults struct {

// DependabotConfig holds the configuration defined in dependabot.yml
type DependabotConfig struct {
Version int `yaml:"version"`
Registries map[string]Registry `yaml:"registries,omitempty"`
Updates []Update `yaml:"updates"`
Version int `yaml:"version"`
Registries map[string]Registry `yaml:"registries,omitempty"`
Updates []Update `yaml:"updates"`
EnableBetaEcoSystems bool `yaml:"enable-beta-ecosystems,omitempty"`
}

// Allow holds the config items of an allow definition
Expand All @@ -90,18 +91,19 @@ type Ignore struct {

// Update holds the config items of an update definition
type Update struct {
PackageEcosystem string `yaml:"package-ecosystem"`
Directory string `yaml:"directory"`
Schedule Schedule `yaml:"schedule,omitempty"`
Registries []string `yaml:"registries,omitempty"`
CommitMessage CommitMessage `yaml:"commit-message,omitempty"`
OpenPullRequestsLimit int `yaml:"open-pull-requests-limit,omitempty"`
Assignees []string `yaml:"assignees,omitempty"`
Allow []Allow `yaml:"allow,omitempty"`
Ignore []Ignore `yaml:"ignore,omitempty"`
InsecureExternalCodeExecution string `yaml:"insecure-external-code-execution,omitempty"`
Labels []string `yaml:"labels,omitempty"`
Milestone int `yaml:"milestone,omitempty"`
PackageEcosystem string `yaml:"package-ecosystem"`
Directory string `yaml:"directory"`
Schedule Schedule `yaml:"schedule,omitempty"`
Registries []string `yaml:"registries,omitempty"`
CommitMessage CommitMessage `yaml:"commit-message,omitempty"`
OpenPullRequestsLimit int `yaml:"open-pull-requests-limit,omitempty"`
Assignees []string `yaml:"assignees,omitempty"`
Allow []Allow `yaml:"allow,omitempty"`
Ignore []Ignore `yaml:"ignore,omitempty"`
Groups map[string]Group `yaml:"groups,omitempty"`
InsecureExternalCodeExecution string `yaml:"insecure-external-code-execution,omitempty"`
Labels []string `yaml:"labels,omitempty"`
Milestone int `yaml:"milestone,omitempty"`
PullRequestBranchName struct {
Separator string `yaml:"separator"`
} `yaml:"pull-request-branch-name,omitempty"`
Expand All @@ -112,6 +114,14 @@ type Update struct {
VersioningStrategy string `yaml:"versioning-strategy,omitempty"`
}

// Group holds the config items of a group definition
type Group struct {
Separator string `yaml:"dependency-type,omitempty"`
Patterns []string `yaml:"patterns,omitempty"`
ExcludePatterns []string `yaml:"exclude-patterns,omitempty"`
UpdateTypes []string `yaml:"update-types,omitempty"`
}

// Registry holds the config items of a registry definition
type Registry struct {
Type string `yaml:"type"`
Expand Down
Loading