Skip to content

Commit a76f0e2

Browse files
authored
Support manualRerunCount in task's fields (#13)
1 parent 3794510 commit a76f0e2

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

internal/command/datadog/payload/buildortask.go

+9-5
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ type BuildOrTask struct {
1919
} `json:"user"`
2020
}
2121
Task struct {
22-
ID *int64 `json:"id"`
23-
Name *string `json:"name"`
24-
Status *string `json:"status"`
25-
InstanceType *string `json:"instanceType"`
26-
UniqueLabels []string `json:"uniqueLabels"`
22+
ID *int64 `json:"id"`
23+
Name *string `json:"name"`
24+
Status *string `json:"status"`
25+
InstanceType *string `json:"instanceType"`
26+
UniqueLabels []string `json:"uniqueLabels"`
27+
ManualRerunCount *int64 `json:"manualRerunCount"`
2728
}
2829

2930
common
@@ -66,4 +67,7 @@ func (buildOrTask BuildOrTask) Enrich(header http.Header, evt *datadogsender.Eve
6667
if value := buildOrTask.Task.UniqueLabels; len(value) > 0 {
6768
evt.Tags = append(evt.Tags, fmt.Sprintf("task_unique_labels:%s", strings.Join(value, ",")))
6869
}
70+
if value := buildOrTask.Task.ManualRerunCount; value != nil {
71+
evt.Tags = append(evt.Tags, fmt.Sprintf("manual_rerun_count:%d", *value))
72+
}
6973
}

0 commit comments

Comments
 (0)