MCPcopy
hub / github.com/go-task/task / emitCIErrorAnnotation

Function emitCIErrorAnnotation

cmd/task/task.go:49–58  ·  view source on GitHub ↗

emitCIErrorAnnotation emits an error annotation for supported CI providers.

(err error)

Source from the content-addressed store, hash-verified

47
48// emitCIErrorAnnotation emits an error annotation for supported CI providers.
49func emitCIErrorAnnotation(err error) {
50 if isGA, _ := strconv.ParseBool(os.Getenv("GITHUB_ACTIONS")); !isGA {
51 return
52 }
53 if e, ok := err.(*errors.TaskRunError); ok {
54 fmt.Fprintf(os.Stdout, "::error title=Task '%s' failed::%v\n", e.TaskName, e.Err)
55 return
56 }
57 fmt.Fprintf(os.Stdout, "::error title=Task failed::%v\n", err)
58}
59
60func run() error {
61 log := &logger.Logger{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…