Skip to content

Commit

Permalink
Minor print fix for notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
frikky committed Nov 8, 2024
1 parent 2d919ab commit 34fac16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -637,12 +637,12 @@ func CreateOrgNotification(ctx context.Context, title, description, referenceUrl
}

if project.Environment == "" {
log.Printf("\n\n\n[ERROR] Not generating notification, as no environment has been detected: %#v", project.Environment)

auth := os.Getenv("AUTH")
org := os.Getenv("ORG")
environment := os.Getenv("ENVIRONMENT_NAME")
if len(auth) == 0 || len(org) == 0 || len(environment) == 0 {
log.Printf("[ERROR] Not generating notification, as no environment has been detected: %#v. This should not happen in Orborus.", project.Environment)
return nil
}

Expand All @@ -666,7 +666,7 @@ func CreateOrgNotification(ctx context.Context, title, description, referenceUrl

} else {
if project.Environment != "cloud" {
log.Printf("[DEBUG] No cached notification for %s. Creating one", referenceUrl)
//log.Printf("[DEBUG] No cached notification for %s. Creating one", referenceUrl)
}

err := SetCache(ctx, cacheKey, []byte("1"), 1)
Expand Down

0 comments on commit 34fac16

Please sign in to comment.