From d352828f0705cb7c21e1b3a0e27085b887ceff5d Mon Sep 17 00:00:00 2001 From: PhilippSieber Date: Tue, 15 Aug 2023 09:46:44 +0200 Subject: [PATCH 1/3] go 1.21 --- .github/workflows/go.yml | 2 +- go.mod | 2 +- go.sum | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index cabae22..a2e07e1 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -6,7 +6,7 @@ jobs: test: strategy: matrix: - go-version: [1.20.x] + go-version: [1.21.x] platform: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.platform }} steps: diff --git a/go.mod b/go.mod index d3e6372..8aac227 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/getyourguide/dependabutler -go 1.20 +go 1.21 require ( github.com/google/go-github/v50 v50.2.0 diff --git a/go.sum b/go.sum index eecde0c..8405ca3 100644 --- a/go.sum +++ b/go.sum @@ -12,6 +12,7 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github/v50 v50.2.0 h1:j2FyongEHlO9nxXLc+LP3wuBSVU9mVxfpdYUexMpIfk= github.com/google/go-github/v50 v50.2.0/go.mod h1:VBY8FB6yPIjrtKhozXv4FQupxKLS6H4m6xFZlT43q8Q= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= From 69a85f10e6496e9acc35ac68d07779ef231cf71c Mon Sep 17 00:00:00 2001 From: PhilippSieber Date: Mon, 5 Feb 2024 11:03:25 +0100 Subject: [PATCH 2/3] add groups to config parser --- internal/pkg/config/config.go | 40 ++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/internal/pkg/config/config.go b/internal/pkg/config/config.go index f4dab7e..ef3b3c5 100644 --- a/internal/pkg/config/config.go +++ b/internal/pkg/config/config.go @@ -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 @@ -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"` @@ -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"` From 1ee6ef826cbfa69bcba67efd813747fefe41d5f9 Mon Sep 17 00:00:00 2001 From: PhilippSieber Date: Tue, 6 Feb 2024 15:39:10 +0100 Subject: [PATCH 3/3] update go.yml --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 9c82c51..d1f720c 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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