diff options
author | Unknwon <u@gogs.io> | 2015-09-02 11:13:37 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-09-02 11:13:37 -0400 |
commit | 5da306c0e5a2939b836d5ec00a0984a2c30e0f9f (patch) | |
tree | 6b4632617336a3536fddbe31ad50aab9f389580e /models/issue.go | |
parent | d951824ff9c52919e2821d0e9be2504550a994fc (diff) | |
download | gitea-5da306c0e5a2939b836d5ec00a0984a2c30e0f9f.tar.gz gitea-5da306c0e5a2939b836d5ec00a0984a2c30e0f9f.zip |
tmp: fix issue open count
Diffstat (limited to 'models/issue.go')
-rw-r--r-- | models/issue.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/models/issue.go b/models/issue.go index 9810a2595a..fff33cf369 100644 --- a/models/issue.go +++ b/models/issue.go @@ -903,16 +903,15 @@ func (pr *PullRequest) AfterSet(colName string, _ xorm.Cell) { } // Merge merges pull request to base repository. -func (pr *PullRequest) Merge(baseGitRepo *git.Repository) (err error) { +func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error) { sess := x.NewSession() defer sessionRelease(sess) if err = sess.Begin(); err != nil { return err } - pr.Pull.IsClosed = true - if _, err = sess.Id(pr.Pull.ID).AllCols().Update(pr.Pull); err != nil { - return fmt.Errorf("update pull: %v", err) + if err = pr.Pull.changeStatus(sess, doer, true); err != nil { + return fmt.Errorf("Pull.changeStatus: %v", err) } headRepoPath := RepoPath(pr.HeadUserName, pr.HeadRepo.Name) |