You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2023/11/30 10:13:41 UTC

(incubator-devlake) branch fix-date-00 updated: fix: incorrect datetime value: '0000-00-00' for column latest_updated_date

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

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


The following commit(s) were added to refs/heads/fix-date-00 by this push:
     new a10fd872e fix: incorrect datetime value: '0000-00-00' for column latest_updated_date
a10fd872e is described below

commit a10fd872e7bdb1903bed925f01bc628be7da1003
Author: abeizn <zi...@merico.dev>
AuthorDate: Thu Nov 30 18:13:31 2023 +0800

    fix: incorrect datetime value: '0000-00-00' for column latest_updated_date
---
 backend/plugins/github_graphql/tasks/deployment_collector_extractor.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/backend/plugins/github_graphql/tasks/deployment_collector_extractor.go b/backend/plugins/github_graphql/tasks/deployment_collector_extractor.go
index fa8db34e4..4f8d7e21f 100644
--- a/backend/plugins/github_graphql/tasks/deployment_collector_extractor.go
+++ b/backend/plugins/github_graphql/tasks/deployment_collector_extractor.go
@@ -173,6 +173,9 @@ func convertGithubDeployment(deployment GraphqlQueryDeploymentDeployment, connec
 		LatestStatusState: deployment.LatestStatus.State,
 		LatestUpdatedDate: deployment.LatestStatus.UpdatedAt,
 	}
+	if !deployment.LatestStatus.UpdatedAt.IsZero() {
+		ret.LatestUpdatedDate = deployment.LatestStatus.UpdatedAt
+	}
 	if deployment.Ref != nil {
 		ret.RefName = deployment.Ref.Name
 	}