forked from forgejo/forgejo
models/issue: improve quality and performance of NewIssue function
This commit is contained in:
parent
4a46613916
commit
4042d1f0c3
13 changed files with 146 additions and 173 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue