This commit is contained in:
Zettat123
2024-04-28 14:27:23 +08:00
parent a02791ffe2
commit 6bf388bdd7
12 changed files with 43 additions and 29 deletions
+1 -1
View File
@@ -196,7 +196,7 @@ func UpdateIssuesCommit(ctx context.Context, doer *user_model.User, repo *repo_m
}
if isClosed != refIssue.IsClosed {
refIssue.Repo = refRepo
if err := ChangeStatus(ctx, refIssue, doer, c.Sha1, isClosed, false); err != nil {
if err := ChangeStatus(ctx, refIssue, doer, c.Sha1, isClosed); err != nil {
return err
}
}
+2 -2
View File
@@ -13,8 +13,8 @@ import (
)
// ChangeStatus changes issue status to open or closed.
func ChangeStatus(ctx context.Context, issue *issues_model.Issue, doer *user_model.User, commitID string, closed, isMergePull bool) error {
comment, err := issues_model.ChangeIssueStatus(ctx, issue, doer, closed, isMergePull)
func ChangeStatus(ctx context.Context, issue *issues_model.Issue, doer *user_model.User, commitID string, closed bool) error {
comment, err := issues_model.ChangeIssueStatus(ctx, issue, doer, closed)
if err != nil {
if issues_model.IsErrDependenciesLeft(err) && closed {
if err := issues_model.FinishIssueStopwatchIfPossible(ctx, doer, issue); err != nil {