1
0
Fork 0
forked from forgejo/forgejo

models/issue: improve quality and performance of NewIssue function

This commit is contained in:
Unknwon 2016-08-15 18:40:32 -07:00
parent 4a46613916
commit 4042d1f0c3
13 changed files with 146 additions and 173 deletions

View file

@ -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)
}