Another bugfix
This commit is contained in:
parent
1dd6be2180
commit
99705264ea
|
@ -101,11 +101,12 @@ RETURNING repo_id, issue_id, issue_number, title, address, commit_id;
|
|||
|
||||
-- :name create-pull-request! :! :n
|
||||
-- :doc creates pull request
|
||||
INSERT INTO pull_requests (repo_id, pr_id, pr_number, user_id)
|
||||
INSERT INTO pull_requests (repo_id, pr_id, pr_number, commit_id, user_id)
|
||||
SELECT
|
||||
:repo_id,
|
||||
:pr_id,
|
||||
:pr_number,
|
||||
:commit_id,
|
||||
:user_id
|
||||
WHERE NOT exists(SELECT 1
|
||||
FROM pull_requests
|
||||
|
|
|
@ -11,14 +11,17 @@
|
|||
(def label-name "bounty")
|
||||
|
||||
(defn find-issue-event
|
||||
[events type]
|
||||
(first (filter #(= type (:event %)) events)))
|
||||
[events type owner]
|
||||
(first (filter #(and
|
||||
(= owner (get-in % [:actor :login]))
|
||||
(= type (:event %)))
|
||||
events)))
|
||||
|
||||
(defn find-commit-id
|
||||
[user repo issue-number event-type]
|
||||
(->
|
||||
(github/get-issue-events user repo issue-number)
|
||||
(find-issue-event event-type)
|
||||
(find-issue-event event-type user)
|
||||
(:commit_id)))
|
||||
|
||||
(defn handle-issue-closed
|
||||
|
|
Loading…
Reference in New Issue