Kaynağa Gözat

removing build/predeploy webhook support for now (#4546)

Yosef Mihretie 2 yıl önce
ebeveyn
işleme
6f3906352e

+ 1 - 11
api/server/handlers/porter_app/app_event_webhook_get.go

@@ -21,9 +21,7 @@ type AppEventWebhooksHandler struct {
 }
 
 const (
-	appEventTypeBuild     string = "build"
-	appEventTypePredeploy string = "predeploy"
-	appEventTypeDeploy    string = "deploy"
+	appEventTypeDeploy string = "deploy"
 
 	appEventStatusSuccess  string = "success"
 	appEventStatusFailed   string = "failed"
@@ -127,10 +125,6 @@ func (a *AppEventWebhooksHandler) ServeHTTP(w http.ResponseWriter, r *http.Reque
 
 func toWebhookAppEventTypeEnum(appEventType string) (porterv1.WebhookAppEventType, error) {
 	switch appEventType {
-	case appEventTypeBuild:
-		return porterv1.WebhookAppEventType_WEBHOOK_APP_EVENT_TYPE_BUILD, nil
-	case appEventTypePredeploy:
-		return porterv1.WebhookAppEventType_WEBHOOK_APP_EVENT_TYPE_PREDEPLOY, nil
 	case appEventTypeDeploy:
 		return porterv1.WebhookAppEventType_WEBHOOK_APP_EVENT_TYPE_DEPLOY, nil
 	default:
@@ -140,10 +134,6 @@ func toWebhookAppEventTypeEnum(appEventType string) (porterv1.WebhookAppEventTyp
 
 func toAppEventType(appEventWebhookEnum porterv1.WebhookAppEventType) (string, error) {
 	switch appEventWebhookEnum {
-	case porterv1.WebhookAppEventType_WEBHOOK_APP_EVENT_TYPE_BUILD:
-		return appEventTypeBuild, nil
-	case porterv1.WebhookAppEventType_WEBHOOK_APP_EVENT_TYPE_PREDEPLOY:
-		return appEventTypePredeploy, nil
 	case porterv1.WebhookAppEventType_WEBHOOK_APP_EVENT_TYPE_DEPLOY:
 		return appEventTypeDeploy, nil
 	default:

+ 0 - 2
dashboard/src/main/home/app-dashboard/app-view/tabs/Webhooks.tsx

@@ -22,9 +22,7 @@ type Webhook = {
 };
 
 const stepOptions = [
-  { value: "build", label: "Build" },
   { value: "deploy", label: "Deploy" },
-  { value: "predeploy", label: "Predeploy" },
 ];
 
 const statusOptions = [