summaryrefslogtreecommitdiffstats
path: root/models/pull.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-15 18:40:32 -0700
committerUnknwon <u@gogs.io>2016-08-15 18:40:32 -0700
commit4042d1f0c3c545773f81e2ca1b4eb8662bc4c425 (patch)
tree9bbbb404c9ee719f10e379cfc9699fddeaa94c0a /models/pull.go
parent4a46613916cdfa6a168746aba6abcd698cd17875 (diff)
downloadgitea-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.go8
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)
}