fixed issues from opencode agent

This commit is contained in:
2026-05-13 01:08:19 +02:00
parent 994570ca74
commit dea58b85b8
6 changed files with 29 additions and 14 deletions
+8 -2
View File
@@ -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
}