You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2024/05/31 05:19:53 UTC

(incubator-devlake) 01/01: fix: startedDate and finishedDate should be required

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

klesh pushed a commit to branch kw-webhook-deployment-required
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit c39c9e7e4b863e894747441cb3c7da4b64023870
Author: Klesh Wong <zh...@merico.dev>
AuthorDate: Fri May 31 13:19:37 2024 +0800

    fix: startedDate and finishedDate should be required
---
 backend/plugins/webhook/api/deployments.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/backend/plugins/webhook/api/deployments.go b/backend/plugins/webhook/api/deployments.go
index 005186004..c4c292956 100644
--- a/backend/plugins/webhook/api/deployments.go
+++ b/backend/plugins/webhook/api/deployments.go
@@ -49,7 +49,7 @@ type WebhookDeploymentReq struct {
 	CreatedDate       *time.Time                   `mapstructure:"createdDate"`
 	// QueuedDate   *time.Time `mapstructure:"queue_time"`
 	StartedDate  *time.Time `mapstructure:"startedDate" validate:"required"`
-	FinishedDate *time.Time `mapstructure:"finishedDate"`
+	FinishedDate *time.Time `mapstructure:"finishedDate" validate:"required"`
 }
 
 type WebhookDeploymentCommitReq struct {
@@ -65,7 +65,7 @@ type WebhookDeploymentCommitReq struct {
 	CreatedDate  *time.Time `mapstructure:"createdDate"`
 	// QueuedDate   *time.Time `mapstructure:"queue_time"`
 	StartedDate  *time.Time `mapstructure:"startedDate" validate:"required"`
-	FinishedDate *time.Time `mapstructure:"finishedDate"`
+	FinishedDate *time.Time `mapstructure:"finishedDate" validate:"required"`
 }
 
 // PostDeployments