This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new fcf9df2f7 fix: subtask convertPipelineSteps ended with error (#4555)
fcf9df2f7 is described below

commit fcf9df2f7feff1298af0a008684cc928e36b27c8
Author: mindlesscloud <[email protected]>
AuthorDate: Wed Mar 1 13:54:28 2023 +0800

    fix: subtask convertPipelineSteps ended with error (#4555)
---
 backend/plugins/bitbucket/tasks/pipeline_steps_convertor.go | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/backend/plugins/bitbucket/tasks/pipeline_steps_convertor.go 
b/backend/plugins/bitbucket/tasks/pipeline_steps_convertor.go
index 3ea42a2ef..ec69b391b 100644
--- a/backend/plugins/bitbucket/tasks/pipeline_steps_convertor.go
+++ b/backend/plugins/bitbucket/tasks/pipeline_steps_convertor.go
@@ -83,9 +83,11 @@ func ConvertPipelineSteps(taskCtx plugin.SubTaskContext) 
errors.Error {
                                        Default:    devops.DONE,
                                }, bitbucketPipelineStep.State),
                        }
-                       if bitbucketPipelineStep.StartedOn != nil {
-                               domainTask.StartedDate = 
*bitbucketPipelineStep.StartedOn
+                       // not save to domain layer if StartedOn is empty
+                       if bitbucketPipelineStep.StartedOn == nil {
+                               return nil, nil
                        }
+                       domainTask.StartedDate = 
*bitbucketPipelineStep.StartedOn
                        // rebuild the FinishedDate
                        if domainTask.Status == devops.DONE {
                                domainTask.FinishedDate = 
bitbucketPipelineStep.CompletedOn

Reply via email to