diff --git a/pkg/apis/pipeline/v1alpha1/run_types.go b/pkg/apis/pipeline/v1alpha1/run_types.go index 16cd209ac3e..74e3e0b09dc 100644 --- a/pkg/apis/pipeline/v1alpha1/run_types.go +++ b/pkg/apis/pipeline/v1alpha1/run_types.go @@ -163,6 +163,11 @@ type RunList struct { Items []Run `json:"items"` } +// GetStatusCondition returns the task run status as a ConditionAccessor +func (r *Run) GetStatusCondition() apis.ConditionAccessor { + return &r.Status +} + // GetGroupVersionKind implements kmeta.OwnerRefable. func (*Run) GetGroupVersionKind() schema.GroupVersionKind { return SchemeGroupVersion.WithKind(pipeline.RunControllerName) diff --git a/pkg/reconciler/events/cloudevent/interface.go b/pkg/reconciler/events/cloudevent/interface.go index 961769bf768..c060c522390 100644 --- a/pkg/reconciler/events/cloudevent/interface.go +++ b/pkg/reconciler/events/cloudevent/interface.go @@ -22,7 +22,7 @@ import ( "knative.dev/pkg/apis" ) -// objectWithCondition is implemented by TaskRun and PipelineRun +// objectWithCondition is implemented by TaskRun, PipelineRun and Run type objectWithCondition interface { // Object requires GetObjectKind() and DeepCopyObject()