configurable GH app feature toggle

This commit is contained in:
Teemu Patja 2017-11-04 19:43:19 +02:00
parent f0c978ec47
commit 7143ec286a
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
1 changed files with 3 additions and 2 deletions

View File

@ -39,10 +39,11 @@
(authorize-url "user:email"))
;; NOTE: Capabilities picked for Github apps if true, Oauth if false
(def github-app-flag true)
(defn github-app-enabled? []
(env :github-app-enabled) true)
(defn admin-authorize-url []
(if github-app-flag
(if (github-app-enabled?)
(authorize-url "public_repo user:email")
(authorize-url "admin:repo_hook repo user:email admin:org_hook")))