diff options
author | guillep2k <18600385+guillep2k@users.noreply.github.com> | 2020-01-10 22:20:11 -0300 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2020-01-11 09:20:11 +0800 |
commit | 705b1e49a8b2ac8df377120f70f3548df15cdf49 (patch) | |
tree | 98179854c551616dd75dab8eda26838be58ba962 /services/pull/merge.go | |
parent | 438e159d04dc726b7872747d1a05a8ed6b528037 (diff) | |
download | gitea-705b1e49a8b2ac8df377120f70f3548df15cdf49.tar.gz gitea-705b1e49a8b2ac8df377120f70f3548df15cdf49.zip |
Don't attempt to close issue if already closed (#9696)
Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'services/pull/merge.go')
-rw-r--r-- | services/pull/merge.go | 6 |
1 files changed, 4 insertions, 2 deletions
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 + } } } |