Skip to content

Commit

Permalink
buggy
Browse files Browse the repository at this point in the history
  • Loading branch information
qu1queee committed Jan 22, 2024
1 parent cc8f1d6 commit 0a01a85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/apis/build/v1beta1/buildrun_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ func (src *BuildRun) ConvertTo(ctx context.Context, obj *unstructured.Unstructur
conditions = append(conditions, ct)
}

var failureDetails v1alpha1.FailureDetails

if src.Status.FailureDetails != nil {
alphaBuildRun.Status.FailureDetails = &v1alpha1.FailureDetails{
failureDetails = v1alpha1.FailureDetails{
Reason: src.Status.FailureDetails.Reason,
Message: src.Status.FailureDetails.Message,
Location: &v1alpha1.FailedAt{
Expand All @@ -153,6 +155,7 @@ func (src *BuildRun) ConvertTo(ctx context.Context, obj *unstructured.Unstructur
LatestTaskRunRef: src.Status.TaskRunName,
StartTime: src.Status.StartTime,
CompletionTime: src.Status.CompletionTime,
FailureDetails: &failureDetails,
}

// TODO: add test case
Expand Down

0 comments on commit 0a01a85

Please sign in to comment.