Skip to content

Commit 32cc408

Browse files
committed
implement monitor methods for github
Signed-off-by: Vivek Kumar Sahu <[email protected]>
1 parent f0d362e commit 32cc408

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pkg/source/github/adapter.go

+9
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ func (g *GitHubAdapter) FetchSBOMs(ctx *tcontext.TransferMetadata) (iterator.SBO
268268
return sbomIterator, err
269269
}
270270

271+
func (g *GitHubAdapter) Monitor(ctx *tcontext.TransferMetadata) (iterator.SBOMIterator, *tcontext.TransferMetadata, error) {
272+
return nil, ctx, fmt.Errorf("Currently gitHub adapter does not support monitoring")
273+
}
274+
271275
// OutputSBOMs should return an error since GitHub does not support SBOM uploads
272276
func (g *GitHubAdapter) UploadSBOMs(ctx *tcontext.TransferMetadata, iterator iterator.SBOMIterator) error {
273277
return fmt.Errorf("GitHub adapter does not support SBOM uploading")
@@ -370,6 +374,11 @@ func (g *GitHubAdapter) applyRepoFilters(repos []string) []string {
370374
return filteredRepos
371375
}
372376

377+
func (g *GitHubAdapter) fetchWatcher(ctx *tcontext.TransferMetadata, repos []string) (iterator.SBOMIterator, error) {
378+
logger.LogInfo(ctx.Context, "Monitoring SBOM via github adapter currently doesn't support")
379+
return nil, nil
380+
}
381+
373382
func (g *GitHubAdapter) fetchSBOMsConcurrently(ctx *tcontext.TransferMetadata, repos []string) (iterator.SBOMIterator, error) {
374383
logger.LogDebug(ctx.Context, "Fetching SBOMs concurrently")
375384
const maxWorkers = 5 // Number of concurrent workers (adjustable)

0 commit comments

Comments
 (0)