Skip to content

Commit 415fded

Browse files
committed
minor adjustments - updates compliance policies
1 parent 3ac4a32 commit 415fded

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

internal/core/assetversion/asset_version_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ func (a *AssetVersionController) BuildPDFFromSBOM(ctx core.Context) error {
444444
return err
445445
}
446446

447+
//go:embed report-templates/*
447448
var resourceFiles embed.FS
448449

449450
func buildZIPInMemory(writer io.Writer, templateName string, metadata, markdown *bytes.Buffer) error {

internal/core/integrations/gitlabint/gitlab_integration.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -365,17 +365,13 @@ func (g *GitlabIntegration) ListGroups(ctx core.Context, userID string, provider
365365
})
366366
}
367367

368-
allGroups, err := errgroup.WaitAndCollect()
368+
cleanedGroups, err := errgroup.WaitAndCollect()
369369
if err != nil {
370370
return nil, err
371371
}
372-
// filter all the nil values from the result
373-
cleanedGroups := make([]*gitlab.Group, 0, len(groups))
374-
for i := range allGroups {
375-
if allGroups[i] != nil {
376-
cleanedGroups = append(cleanedGroups, allGroups[i])
377-
}
378-
}
372+
cleanedGroups = utils.Filter(cleanedGroups, func(g *gitlab.Group) bool {
373+
return g != nil
374+
})
379375

380376
return utils.Map(cleanedGroups, func(el *gitlab.Group) models.Project {
381377
return groupToProject(el, providerID)

0 commit comments

Comments
 (0)