Put adding bounties for existing issues behind a feature toggle (default: false)

This commit is contained in:
Teemu Patja 2017-11-02 09:05:21 +02:00
parent d1c375493f
commit ed1a64bca4
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
2 changed files with 6 additions and 4 deletions

View File

@ -45,8 +45,7 @@
issue-number issue-number
transaction-hash) transaction-hash)
:id :id
(issues/update-comment-id issue-id))) (issues/update-comment-id issue-id))))
)
(issues/update-transaction-hash issue-id transaction-hash)))) (issues/update-transaction-hash issue-id transaction-hash))))
(log/debug "Issue already exists in DB, ignoring")))) (log/debug "Issue already exists in DB, ignoring"))))

View File

@ -21,6 +21,9 @@
[clojure.set :refer [rename-keys]] [clojure.set :refer [rename-keys]]
[clojure.string :as str])) [clojure.string :as str]))
(defn add-bounties-for-existing-issues? []
(env :add-bounties-for-existing-issues false))
(defn access-error [_ _] (defn access-error [_ _]
(unauthorized {:error "unauthorized"})) (unauthorized {:error "unauthorized"}))
@ -56,8 +59,8 @@
(repositories/update-repo repo-id {:hook_id (:id created-hook)}))) (repositories/update-repo repo-id {:hook_id (:id created-hook)})))
(github/create-label full-repo token) (github/create-label full-repo token)
(repositories/update-repo repo-id {:state 2}) (repositories/update-repo repo-id {:state 2})
(bounties/add-bounties-for-existing-issues full-repo)) (when (add-bounties-for-existing-issues?)
(bounties/add-bounties-for-existing-issues full-repo)))
(defn disable-repo [repo-id full-repo hook-id token] (defn disable-repo [repo-id full-repo hook-id token]
(log/debug "disable-repo" repo-id full-repo) (log/debug "disable-repo" repo-id full-repo)