This commit is contained in:
kagel 2016-09-01 02:24:00 +03:00
parent 9e8ecd50a3
commit e1c7b08174
1 changed files with 2 additions and 1 deletions

View File

@ -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, commit_id, user_id)
INSERT INTO pull_requests (repo_id, pr_id, pr_number, issue_number, commit_id, user_id)
SELECT
:repo_id,
:pr_id,
:pr_number,
:issue_number,
:commit_id,
:user_id
WHERE NOT exists(SELECT 1