diff options
author | Unknwon <u@gogs.io> | 2016-08-15 18:40:32 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-15 18:40:32 -0700 |
commit | 4042d1f0c3c545773f81e2ca1b4eb8662bc4c425 (patch) | |
tree | 9bbbb404c9ee719f10e379cfc9699fddeaa94c0a /models/pull.go | |
parent | 4a46613916cdfa6a168746aba6abcd698cd17875 (diff) | |
download | gitea-4042d1f0c3c545773f81e2ca1b4eb8662bc4c425.tar.gz gitea-4042d1f0c3c545773f81e2ca1b4eb8662bc4c425.zip |
models/issue: improve quality and performance of NewIssue function
Diffstat (limited to 'models/pull.go')
-rw-r--r-- | models/pull.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/models/pull.go b/models/pull.go index 39361595ff..09c20df82c 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) } |