From 4042d1f0c3c545773f81e2ca1b4eb8662bc4c425 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 15 Aug 2016 18:40:32 -0700 Subject: models/issue: improve quality and performance of NewIssue function --- models/pull.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'models/pull.go') diff --git a/models/pull.go b/models/pull.go index 39361595..09c20df8 100644 --- a/models/pull.go +++ b/models/pull.go @@ -388,7 +388,13 @@ func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []str return err } - if err = newIssue(sess, repo, pull, labelIDs, uuids, true); err != nil { + if err = newIssue(sess, &NewIssueOptions{ + Repo: repo, + Issue: pull, + LableIDs: labelIDs, + Attachments: uuids, + IsPull: true, + }); err != nil { return fmt.Errorf("newIssue: %v", err) } -- cgit v1.2.3