aboutsummaryrefslogtreecommitdiff
path: root/models/action.go
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-07-24 12:49:43 -0400
committerUnknwon <joe2010xtmf@163.com>2014-07-24 12:49:43 -0400
commitc20f5dc2ea1b27e80c28e00831278c7451ba6cce (patch)
tree85d1f32c36f962ad6338ec75e3a7a8ff8baf1905 /models/action.go
parenta41a1fe60da5b02891640dd5f99758015b78bcc9 (diff)
parentda0240aacd5646bd73b2e22d92d88578dbafd64b (diff)
Merge branch 'dev' of github.com:gogits/gogs into dev
Diffstat (limited to 'models/action.go')
-rw-r--r--models/action.go16
1 files changed, 2 insertions, 14 deletions
diff --git a/models/action.go b/models/action.go
index 362b238f..0342abf5 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
}
}