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