Skip to content

Commit

Permalink
🚸 Make non-CI warning similar to other warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed Sep 17, 2024
1 parent 36a91ca commit a4b24a5
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions platform/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,16 +289,15 @@ func getProblemsFoundMessage(newProblems int) string {
func formatMessageForCI(level, format string, a ...interface{}) string {
message := fmt.Sprintf(format, a...)
ci := cienvironment.DetectCIEnvironment()
if ci == nil {
return message
}
name := getCIName(ci)
if name == "github-actions" {
return fmt.Sprintf("::%s::%s", level, message)
} else if strings.HasPrefix(name, "azure") {
return fmt.Sprintf("##vso[task.logissue type=%s]%s", level, message)
} else if strings.HasPrefix(name, "circleci") {
return fmt.Sprintf("echo '%s: %s'", level, message)
if ci != nil {
name := getCIName(ci)
if name == "github-actions" {
return fmt.Sprintf("::%s::%s", level, message)
} else if strings.HasPrefix(name, "azure") {
return fmt.Sprintf("##vso[task.logissue type=%s]%s", level, message)
} else if strings.HasPrefix(name, "circleci") {
return fmt.Sprintf("echo '%s: %s'", level, message)
}
}
return message
return fmt.Sprintf("! %s", message)
}

0 comments on commit a4b24a5

Please sign in to comment.