d4x1 commented on PR #6717: URL: https://github.com/apache/incubator-devlake/pull/6717#issuecomment-1874045028
Thank you for your contribution. Your behavior is appreciated. Checking `DeployableCommitCreatedAt` can solve this error for sure, but I don't think it's the right way. We should digg the root casue of empty `DeployableCommitCreatedAt` and avoid this field to be zero. For this issue, I think some GitLab deployments may have empty deployment. There are some acceptable ways to solve it: 1. Change `DeployableCommitCreatedAt` in `GitlabDeployment` to `*time.Time`, if `r.Deployable.Commit.CreatedAt` is zero, we can set `DeployableCommitCreatedAt` nil. 2. Change related field in `GitlabDeploymentResp`, set them pointer, so we can handle situations that some fields are missing in the API's response. @ralfer77 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
