Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions cmd/criticality_score/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,21 +203,26 @@ func main() {
for u := range repos {
l := innerLogger.With(zap.String("url", u.String()))
ss, err := c.Collect(ctx, u, "")
extras := []signalio.Field{}
if err != nil {
if errors.Is(err, collector.ErrUncollectableRepo) {
l.With(
zap.Error(err),
).Warn("Repo cannot be collected")
return
} else {
l.With(
zap.Error(err),
).Error("Failed to collect signals for repo")
}
l.With(
zap.Error(err),
).Error("Failed to collect signals for repo")
os.Exit(1) // TODO: pass up the error

repoUrl := signalio.Field{
Key: "repo.url",
Value: u.String(),
}
extras = append(extras, repoUrl)
}

// If scoring is enabled, prepare the extra data to be output.
extras := []signalio.Field{}
if s != nil {
f := signalio.Field{
Key: scoreColumnName,
Expand Down