diff --git a/pkg/sources/filesystem/filesystem.go b/pkg/sources/filesystem/filesystem.go index 5b71c31de..30fe20ee3 100644 --- a/pkg/sources/filesystem/filesystem.go +++ b/pkg/sources/filesystem/filesystem.go @@ -34,7 +34,6 @@ type Source struct { jobId int64 verify bool paths []string - aCtx context.Context log *log.Entry sources.Progress } @@ -60,7 +59,6 @@ func (s *Source) JobID() int64 { func (s *Source) Init(aCtx context.Context, name string, jobId, sourceId int64, verify bool, connection *anypb.Any, _ int) error { s.log = log.WithField("source", s.Type()).WithField("name", name) - s.aCtx = aCtx s.name = name s.sourceId = sourceId s.jobId = jobId diff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.go index e66d14d0b..192d257dc 100644 --- a/pkg/sources/git/git.go +++ b/pkg/sources/git/git.go @@ -40,7 +40,6 @@ type Source struct { jobId int64 verify bool git *Git - aCtx context.Context sources.Progress conn *sourcespb.Git } @@ -89,7 +88,6 @@ func (s *Source) JobID() int64 { // Init returns an initialized GitHub source. func (s *Source) Init(aCtx context.Context, name string, jobId, sourceId int64, verify bool, connection *anypb.Any, concurrency int) error { - s.aCtx = aCtx s.name = name s.sourceId = sourceId s.jobId = jobId diff --git a/pkg/sources/github/github.go b/pkg/sources/github/github.go index 2f0e7c00c..9f1bd1e24 100644 --- a/pkg/sources/github/github.go +++ b/pkg/sources/github/github.go @@ -56,7 +56,6 @@ type Source struct { ignoreRepos []string git *git.Git httpClient *http.Client - aCtx context.Context log *log.Entry conn *sourcespb.GitHub jobPool *errgroup.Group @@ -128,7 +127,6 @@ func (s *Source) UserAndToken(ctx context.Context, installationClient *github.Cl func (s *Source) Init(aCtx context.Context, name string, jobID, sourceID int64, verify bool, connection *anypb.Any, concurrency int) error { s.log = log.WithField("source", s.Type()).WithField("name", name) - s.aCtx = aCtx s.name = name s.sourceID = sourceID s.jobID = jobID diff --git a/pkg/sources/gitlab/gitlab.go b/pkg/sources/gitlab/gitlab.go index 74a83602a..c139c0bbf 100644 --- a/pkg/sources/gitlab/gitlab.go +++ b/pkg/sources/gitlab/gitlab.go @@ -43,7 +43,6 @@ type Source struct { ignoreRepos []string git *git.Git scanOptions *git.ScanOptions - aCtx context.Context resumeInfoSlice []string resumeInfoMutex sync.Mutex jobSem *semaphore.Weighted @@ -68,9 +67,8 @@ func (s *Source) JobID() int64 { } // Init returns an initialized Gitlab source. -func (s *Source) Init(aCtx context.Context, name string, jobId, sourceId int64, verify bool, connection *anypb.Any, concurrency int) error { +func (s *Source) Init(_ context.Context, name string, jobId, sourceId int64, verify bool, connection *anypb.Any, concurrency int) error { - s.aCtx = aCtx s.name = name s.sourceId = sourceId s.jobId = jobId diff --git a/pkg/sources/s3/s3.go b/pkg/sources/s3/s3.go index eb55fca28..7dc2489c6 100644 --- a/pkg/sources/s3/s3.go +++ b/pkg/sources/s3/s3.go @@ -35,7 +35,6 @@ type Source struct { jobId int64 verify bool concurrency int - aCtx context.Context log logr.Logger sources.Progress errorCount *sync.Map @@ -62,7 +61,6 @@ func (s *Source) JobID() int64 { func (s *Source) Init(aCtx context.Context, name string, jobId, sourceId int64, verify bool, connection *anypb.Any, concurrency int) error { s.log = context.WithValues(aCtx, "source", s.Type(), "name", name).Logger() - s.aCtx = aCtx s.name = name s.sourceId = sourceId s.jobId = jobId diff --git a/pkg/sources/syslog/syslog.go b/pkg/sources/syslog/syslog.go index 7770f0a51..fce51d432 100644 --- a/pkg/sources/syslog/syslog.go +++ b/pkg/sources/syslog/syslog.go @@ -32,7 +32,6 @@ type Source struct { jobId int64 verify bool syslog *Syslog - aCtx context.Context sources.Progress conn *sourcespb.Syslog } @@ -83,9 +82,8 @@ func (s *Source) InjectConnection(conn *sourcespb.Syslog) { } // Init returns an initialized Syslog source. -func (s *Source) Init(aCtx context.Context, name string, jobId, sourceId int64, verify bool, connection *anypb.Any, concurrency int) error { +func (s *Source) Init(_ context.Context, name string, jobId, sourceId int64, verify bool, connection *anypb.Any, concurrency int) error { - s.aCtx = aCtx s.name = name s.sourceId = sourceId s.jobId = jobId diff --git a/proto/sources.proto b/proto/sources.proto index 08b1333e8..6350d0e56 100644 --- a/proto/sources.proto +++ b/proto/sources.proto @@ -157,6 +157,7 @@ message GitHub { string head = 9; string base = 10; repeated string ignoreRepos = 11; + repeated string includeRepos = 12; } message JIRA {