Skip to content

Commit

Permalink
Support timestamp result conversion
Browse files Browse the repository at this point in the history
From beta to alpha
  • Loading branch information
qu1queee committed Feb 13, 2024
1 parent 06cd598 commit 6e33fda
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/apis/build/v1beta1/buildrun_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,19 @@ func (src *BuildRun) ConvertTo(ctx context.Context, obj *unstructured.Unstructur
// Note: v1alpha contains a Name field under the SourceResult
// object, which we dont set here.
sourceStatus = append(sourceStatus, v1alpha1.SourceResult{
Git: (*v1alpha1.GitSourceResult)(src.Status.Source.Git),
Name: "default",
Git: (*v1alpha1.GitSourceResult)(src.Status.Source.Git),
Timestamp: src.Status.Source.Timestamp,
})
}

if src.Status.Source != nil && src.Status.Source.OciArtifact != nil {
// Note: v1alpha contains a Name field under the SourceResult
// object, which we dont set here.
sourceStatus = append(sourceStatus, v1alpha1.SourceResult{
Bundle: (*v1alpha1.BundleSourceResult)(src.Status.Source.OciArtifact),
Name: "default",
Bundle: (*v1alpha1.BundleSourceResult)(src.Status.Source.OciArtifact),
Timestamp: src.Status.Source.Timestamp,
})
}

Expand Down

0 comments on commit 6e33fda

Please sign in to comment.