From c6b33e1cb0aed8c0cb24e9ba8a8355dcb22dec3a Mon Sep 17 00:00:00 2001 From: motatoes Date: Sun, 20 Oct 2024 21:20:50 +0100 Subject: [PATCH] make it behind a flag --- next/main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/next/main.go b/next/main.go index 47594d16..fd22bd5d 100644 --- a/next/main.go +++ b/next/main.go @@ -83,8 +83,11 @@ func main() { r.GET("/github/callback", middleware.SupabaseCookieAuth(), diggerController.GithubAppCallbackPage) r.GET("/github/callback_fe", middleware.WebhookAuth(), diggerController.GithubAppCallbackPage) r.POST("/github-app-webhook", diggerController.GithubAppWebHook) - r.GET("/github/setup", controllers.GithubAppSetup) - r.GET("/github/exchange-code", diggerController.GithubSetupExchangeCode) + + if val, exists := os.LookupEnv("DIGGER_EXPOSE_GITHUB_APP_WIZARD"); exists && val == "true" { + r.GET("/github/setup", controllers.GithubAppSetup) + r.GET("/github/exchange-code", diggerController.GithubSetupExchangeCode) + } r.POST("/_internal/process_runs_queue", middleware.WebhookAuth(), diggerController.ProcessRunQueueItems) // process all drift crontabs