diff --git a/project.clj b/project.clj index 094f2f9..4c18522 100644 --- a/project.clj +++ b/project.clj @@ -5,12 +5,13 @@ :exclusions [joda-time]] [re-frame "0.10.2"] [cljs-ajax "0.7.2"] - [secretary "1.2.3"] + [funcool/bide "1.6.0"] [reagent-utils "0.2.1"] [reagent "0.7.0"] [org.clojure/clojurescript "1.9.946"] [org.clojure/clojure "1.8.0"] [selmer "1.11.1"] + [com.taoensso/tufte "1.3.0"] [markdown-clj "1.0.1"] [ring-middleware-format "0.7.2"] [ring/ring-core "1.6.2"] diff --git a/resources/sql/queries.sql b/resources/sql/queries.sql index 8c80d96..e1e7f3b 100644 --- a/resources/sql/queries.sql +++ b/resources/sql/queries.sql @@ -103,19 +103,16 @@ WHERE i.repo_id = :repo_id AND i.confirm_hash is null AND i.is_open = true; --- :name update-repo-generic :! :n -/* :require [clojure.string :as string] - [hugsql.parameters :refer [identifier-param-quote]] */ +-- :name update-repo-name :! :n UPDATE repositories -SET -/*~ -(string/join "," - (for [[field _] (:updates params)] - (str (identifier-param-quote (name field) options) - " = :v:updates." (name field)))) -~*/ -where repo_id = :repo_id; +SET repo = :repo_name +WHERE repo_id = :repo_id +AND repo != :repo_name +-- :name update-repo-state :! :n +UPDATE repositories +SET state = :repo_state +WHERE repo_id = :repo_id -- Issues -------------------------------------------------------------------------- @@ -430,6 +427,14 @@ SELECT exists(SELECT 1 FROM issues WHERE issue_id = :issue_id); +-- :name get-issue :? :1 +-- :doc get issue from DB by repo-id and issue-number +SELECT issue_id, issue_number, is_open, winner_login, commit_sha +FROM issues +WHERE repo_id = :repo_id +AND issue_number = :issue_number; + + -- :name open-bounties :? :* -- :doc all open bounty issues diff --git a/resources/templates/home.html b/resources/templates/home.html index 590156e..6afe0ca 100644 --- a/resources/templates/home.html +++ b/resources/templates/home.html @@ -65,6 +65,7 @@ height="0" width="0" style="display:none;visibility:hidden"> src="https://www.facebook.com/tr?id=293089407869419&ev=PageView&noscript=1" /> +