File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -396,9 +396,14 @@ func filterRunningPipelineRunOnTargetTest(testPipeline string, prs []*tektonv1.P
396396// - the template variable with the one from the event (this includes the remote pipeline that has template variables).
397397func (p * PacRun ) changePipelineRun (ctx context.Context , repo * v1alpha1.Repository , prs []* tektonv1.PipelineRun ) error {
398398 for k , pr := range prs {
399+ prName := pr .GetName ()
400+ if prName == "" {
401+ prName = pr .GetGenerateName ()
402+ }
403+
399404 b , err := json .Marshal (pr )
400405 if err != nil {
401- return err
406+ return fmt . Errorf ( "failed to marshal PipelineRun %s: %w" , prName , err )
402407 }
403408
404409 name := secrets .GenerateBasicAuthSecretName ()
@@ -410,7 +415,7 @@ func (p *PacRun) changePipelineRun(ctx context.Context, repo *v1alpha1.Repositor
410415 var np * tektonv1.PipelineRun
411416 err = json .Unmarshal ([]byte (processed ), & np )
412417 if err != nil {
413- return err
418+ return fmt . Errorf ( "failed to unmarshal PipelineRun %s: %w" , prName , err )
414419 }
415420 // don't crash when we don't have any annotations
416421 if np .Annotations == nil {
You can’t perform that action at this time.
0 commit comments