Skip to content

Commit 61acec8

Browse files
authored
Merge pull request #640 from sm43/fixes-status-report
2 parents f2a2c7a + 6ac9620 commit 61acec8

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

pkg/sort/task_status.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import (
99
"github.com/openshift-pipelines/pipelines-as-code/pkg/consoleui"
1010
"github.com/openshift-pipelines/pipelines-as-code/pkg/formatting"
1111
tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1"
12-
corev1 "k8s.io/api/core/v1"
13-
knativeapi "knative.dev/pkg/apis"
1412
)
1513

1614
type tkr struct {
@@ -42,10 +40,6 @@ func (trs taskrunList) Less(i, j int) bool {
4240
func TaskStatusTmpl(pr *tektonv1beta1.PipelineRun, console consoleui.Interface, statusTemplate string) (string, error) {
4341
trl := taskrunList{}
4442
outputBuffer := bytes.Buffer{}
45-
c := pr.GetStatusCondition().GetCondition(knativeapi.ConditionSucceeded)
46-
if c != nil && c.Status != corev1.ConditionTrue {
47-
return fmt.Sprintf("PipelineRun has failed to be created: %s", c.Message), nil
48-
}
4943

5044
if len(pr.Status.TaskRuns) == 0 {
5145
return "PipelineRun has no taskruns", nil

pkg/sort/task_status_test.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ import (
88
tektontest "github.com/openshift-pipelines/pipelines-as-code/pkg/test/tekton"
99
tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1"
1010
"gotest.tools/v3/assert"
11-
corev1 "k8s.io/api/core/v1"
12-
knativeapi "knative.dev/pkg/apis"
13-
duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1"
1411
)
1512

1613
func TestStatusTmpl(t *testing.T) {
@@ -58,20 +55,6 @@ func TestStatusTmpl(t *testing.T) {
5855
wantRegexp: regexp.MustCompile("PipelineRun has no taskruns"),
5956
pr: tektontest.MakePR("nada", "ns", nil, nil),
6057
},
61-
{
62-
name: "pipelinerun no apply",
63-
wantRegexp: regexp.MustCompile("PipelineRun has failed to be created: looozeuuur"),
64-
pr: tektontest.MakePR("pr1", "looz", map[string]*tektonv1beta1.PipelineRunTaskRunStatus{},
65-
&duckv1beta1.Status{
66-
Conditions: duckv1beta1.Conditions{
67-
{
68-
Status: corev1.ConditionFalse,
69-
Type: knativeapi.ConditionSucceeded,
70-
Message: "looozeuuur",
71-
},
72-
},
73-
}),
74-
},
7558
}
7659
for _, tt := range tests {
7760
t.Run(tt.name, func(t *testing.T) {

0 commit comments

Comments
 (0)