1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 10:18:38 +00:00

Move some issue methods as functions (#19255)

* Move some issue methods as functions

* Fix bug
This commit is contained in:
Lunny Xiao
2022-03-29 22:57:33 +08:00
committed by GitHub
parent bd97736b9c
commit 74731c3a5a
19 changed files with 63 additions and 84 deletions

View File

@@ -14,7 +14,7 @@ import (
// ChangeStatus changes issue status to open or closed.
func ChangeStatus(issue *models.Issue, doer *user_model.User, closed bool) error {
comment, err := issue.ChangeStatus(doer, closed)
comment, err := models.ChangeIssueStatus(issue, doer, closed)
if err != nil {
if models.IsErrDependenciesLeft(err) && closed {
if err := models.FinishIssueStopwatchIfPossible(db.DefaultContext, doer, issue); err != nil {