fixed issues from opencode agent
This commit is contained in:
@@ -65,11 +65,17 @@ func (g *Generator) Start(ctx context.Context) {
|
||||
// generateForRun generates an SBOM for the pipeline run identified by runID.
|
||||
func (g *Generator) generateForRun(runID, repoID int64) {
|
||||
var run models.PipelineRun
|
||||
if found, _ := g.db.ID(runID).Get(&run); !found {
|
||||
if found, err := g.db.ID(runID).Get(&run); err != nil {
|
||||
log.Printf("sbom: look up run %d: %v", runID, err)
|
||||
return
|
||||
} else if !found {
|
||||
return
|
||||
}
|
||||
var repo models.Repository
|
||||
if found, _ := g.db.ID(repoID).Get(&repo); !found {
|
||||
if found, err := g.db.ID(repoID).Get(&repo); err != nil {
|
||||
log.Printf("sbom: look up repo %d: %v", repoID, err)
|
||||
return
|
||||
} else if !found {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user