You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/09/14 09:22:52 UTC

[GitHub] [incubator-devlake] likyh commented on a diff in pull request #3051: feat: add webhook plugin and implement connection save

likyh commented on code in PR #3051:
URL: https://github.com/apache/incubator-devlake/pull/3051#discussion_r970548607


##########
plugins/webhook/api/cicd_pipeline.go:
##########
@@ -0,0 +1,58 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+import (
+	"github.com/apache/incubator-devlake/errors"
+	"github.com/apache/incubator-devlake/plugins/core"
+	"github.com/apache/incubator-devlake/plugins/webhook/models"
+	"net/http"
+	"time"
+)
+
+type WebhookPipelineRequest struct {
+	Id           string     `validate:"required"`
+	Result       string     `validate:"oneof=SUCCESS FAILURE ABORT"`
+	Status       string     `validate:"oneof=IN_PROGRESS DONE"`
+	Type         string     `validate:"oneof=CI CD CI/CD"`
+	CreatedDate  time.Time  `mapstructure:"created_date" validate:"required"`
+	FinishedDate *time.Time `mapstructure:"finished_date"`
+
+	Repo      string `validate:"required"`
+	Branch    string
+	CommitSha string `mapstructure:"commit_sha"`
+}
+
+// PostCicdPipeline

Review Comment:
   pass linter



-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org