Fix actions-metrics-server segfault issue (#2325)
This commit is contained in:
parent
ec3afef00d
commit
149cf47c83
|
|
@ -131,6 +131,10 @@ func (reader *EventReader) ProcessWorkflowJobEvent(ctx context.Context, event in
|
||||||
if *e.WorkflowJob.Conclusion == "failure" {
|
if *e.WorkflowJob.Conclusion == "failure" {
|
||||||
failedStep := "null"
|
failedStep := "null"
|
||||||
for i, step := range e.WorkflowJob.Steps {
|
for i, step := range e.WorkflowJob.Steps {
|
||||||
|
conclusion := step.Conclusion
|
||||||
|
if conclusion == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
// *step.Conclusion ~
|
// *step.Conclusion ~
|
||||||
// "success",
|
// "success",
|
||||||
|
|
@ -141,11 +145,11 @@ func (reader *EventReader) ProcessWorkflowJobEvent(ctx context.Context, event in
|
||||||
// "timed_out",
|
// "timed_out",
|
||||||
// "action_required",
|
// "action_required",
|
||||||
// null
|
// null
|
||||||
if *step.Conclusion == "failure" {
|
if *conclusion == "failure" {
|
||||||
failedStep = fmt.Sprint(i)
|
failedStep = fmt.Sprint(i)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if *step.Conclusion == "timed_out" {
|
if *conclusion == "timed_out" {
|
||||||
failedStep = fmt.Sprint(i)
|
failedStep = fmt.Sprint(i)
|
||||||
parseResult.ExitCode = "timed_out"
|
parseResult.ExitCode = "timed_out"
|
||||||
break
|
break
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue