summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/repofiles/action.go8
-rw-r--r--services/pull/merge.go6
2 files changed, 9 insertions, 5 deletions
diff --git a/modules/repofiles/action.go b/modules/repofiles/action.go
index 07bc1b875b..3be6509bc2 100644
--- a/modules/repofiles/action.go
+++ b/modules/repofiles/action.go
@@ -138,9 +138,11 @@ func UpdateIssuesCommit(doer *models.User, repo *models.Repository, commits []*r
continue
}
}
-
- if err := changeIssueStatus(refRepo, refIssue, doer, ref.Action == references.XRefActionCloses); err != nil {
- return err
+ close := (ref.Action == references.XRefActionCloses)
+ if close != refIssue.IsClosed {
+ if err := changeIssueStatus(refRepo, refIssue, doer, close); err != nil {
+ return err
+ }
}
}
}
diff --git a/services/pull/merge.go b/services/pull/merge.go
index b38c2e72f2..7aec7cef3e 100644
--- a/services/pull/merge.go
+++ b/services/pull/merge.go
@@ -374,8 +374,10 @@ func Merge(pr *models.PullRequest, doer *models.User, baseGitRepo *git.Repositor
return err
}
close := (ref.RefAction == references.XRefActionCloses)
- if err = issue_service.ChangeStatus(ref.Issue, doer, close); err != nil {
- return err
+ if close != ref.Issue.IsClosed {
+ if err = issue_service.ChangeStatus(ref.Issue, doer, close); err != nil {
+ return err
+ }
}
}