diff options
Diffstat (limited to 'models/action.go')
-rw-r--r-- | models/action.go | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/models/action.go b/models/action.go index 362b238f26..0342abf5e3 100644 --- a/models/action.go +++ b/models/action.go @@ -127,7 +127,7 @@ func updateIssuesCommit(userId, repoId int64, repoUserName, repoName string, com url := fmt.Sprintf("/%s/%s/commit/%s", repoUserName, repoName, c.Sha1) message := fmt.Sprintf(`<a href="%s">%s</a>`, url, c.Message) - if err = CreateComment(userId, issue.RepoId, issue.Id, 0, 0, COMMIT, message); err != nil { + if _, err = CreateComment(userId, issue.RepoId, issue.Id, 0, 0, COMMIT, message, nil); err != nil { return err } @@ -142,24 +142,12 @@ func updateIssuesCommit(userId, repoId int64, repoUserName, repoName string, com return err } - issue.Repo, err = GetRepositoryById(issue.RepoId) - - if err != nil { - return err - } - - issue.Repo.NumClosedIssues++ - - if err = UpdateRepository(issue.Repo); err != nil { - return err - } - if err = ChangeMilestoneIssueStats(issue); err != nil { return err } // If commit happened in the referenced repository, it means the issue can be closed. - if err = CreateComment(userId, repoId, issue.Id, 0, 0, CLOSE, ""); err != nil { + if _, err = CreateComment(userId, repoId, issue.Id, 0, 0, CLOSE, "", nil); err != nil { return err } } |