From 898ae06d82532260e73c69acc232dc0e4599e559 Mon Sep 17 00:00:00 2001 From: Ankit Honey Date: Wed, 25 Oct 2023 20:51:51 +0000 Subject: [PATCH 1/3] Adding new Directories key --- internal/model/job.go | 1 + internal/model/job_test.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/internal/model/job.go b/internal/model/job.go index ce4c06a..112f240 100644 --- a/internal/model/job.go +++ b/internal/model/job.go @@ -56,6 +56,7 @@ type Source struct { Provider string `json:"provider" yaml:"provider,omitempty"` Repo string `json:"repo" yaml:"repo,omitempty"` Directory string `json:"directory" yaml:"directory,omitempty"` + Directories []string `json:"directories" yaml:"directories,omitempty"` Branch *string `json:"branch" yaml:"branch,omitempty"` Commit string `json:"commit,omitempty" yaml:"commit,omitempty"` diff --git a/internal/model/job_test.go b/internal/model/job_test.go index a307761..8365b91 100644 --- a/internal/model/job_test.go +++ b/internal/model/job_test.go @@ -92,6 +92,9 @@ job: provider: github repo: dependabot/dependabot-core directory: "/npm_and_yarn/helpers" + directores: + - "/foo/npm_and_yarn/helpers" + - "bar/npm_and_yarn/helpers" branch: api-endpoint: https://api.github.com/ hostname: github.com From acaaecf637974bec7be0ae7fc1f9b9c43dc3a90e Mon Sep 17 00:00:00 2001 From: Jake Coffman Date: Thu, 2 Nov 2023 12:27:41 -0500 Subject: [PATCH 2/3] fix Updater mad that directories is unknown --- internal/model/job.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/model/job.go b/internal/model/job.go index 112f240..5d46200 100644 --- a/internal/model/job.go +++ b/internal/model/job.go @@ -53,12 +53,12 @@ type Job struct { // Source is a reference to some source code type Source struct { - Provider string `json:"provider" yaml:"provider,omitempty"` - Repo string `json:"repo" yaml:"repo,omitempty"` - Directory string `json:"directory" yaml:"directory,omitempty"` - Directories []string `json:"directories" yaml:"directories,omitempty"` - Branch *string `json:"branch" yaml:"branch,omitempty"` - Commit string `json:"commit,omitempty" yaml:"commit,omitempty"` + Provider string `json:"provider" yaml:"provider,omitempty"` + Repo string `json:"repo" yaml:"repo,omitempty"` + Directory string `json:"directory" yaml:"directory,omitempty"` + Directories []string `json:"directories,omitempty" yaml:"directories,omitempty"` + Branch *string `json:"branch" yaml:"branch,omitempty"` + Commit string `json:"commit,omitempty" yaml:"commit,omitempty"` Hostname *string `json:"hostname" yaml:"hostname,omitempty"` // Must be provided if APIEndpoint is APIEndpoint *string `json:"api-endpoint" yaml:"api-endpoint,omitempty"` // Must be provided if Hostname is From cabbad3e47e4f06e2ab4cca1556fb1fba349a89d Mon Sep 17 00:00:00 2001 From: Jake Coffman Date: Thu, 2 Nov 2023 12:33:13 -0500 Subject: [PATCH 3/3] leave this out of the test for now since it's WIP --- internal/model/job_test.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/internal/model/job_test.go b/internal/model/job_test.go index 8365b91..a307761 100644 --- a/internal/model/job_test.go +++ b/internal/model/job_test.go @@ -92,9 +92,6 @@ job: provider: github repo: dependabot/dependabot-core directory: "/npm_and_yarn/helpers" - directores: - - "/foo/npm_and_yarn/helpers" - - "bar/npm_and_yarn/helpers" branch: api-endpoint: https://api.github.com/ hostname: github.com