diff options
author | zeripath <art27@cantab.net> | 2020-01-10 00:14:14 +0000 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2020-01-10 08:14:14 +0800 |
commit | 17b844a3ecbe1dd74bbde750e6a0adea07d92caa (patch) | |
tree | fcb344d7a72a0eab3bf1028e6a4975bc42e528a0 /models/pull.go | |
parent | 6c46a563607de96f11a4248d3656cb158eba80f7 (diff) | |
download | gitea-17b844a3ecbe1dd74bbde750e6a0adea07d92caa.tar.gz gitea-17b844a3ecbe1dd74bbde750e6a0adea07d92caa.zip |
Move Errored PRs out of StatusChecking (#9675)
* Set Errored PRs out of StatusChecking
* Ensure that api status is correctly set too
* Update models/pull.go
Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>
Co-authored-by: John Olheiser <42128690+jolheiser@users.noreply.github.com>
Diffstat (limited to 'models/pull.go')
-rw-r--r-- | models/pull.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/pull.go b/models/pull.go index 876036c9e1..a7f51683db 100644 --- a/models/pull.go +++ b/models/pull.go @@ -35,6 +35,7 @@ const ( PullRequestStatusChecking PullRequestStatusMergeable PullRequestStatusManuallyMerged + PullRequestStatusError ) // PullRequest represents relation between pull request and repositories. @@ -517,7 +518,7 @@ func (pr *PullRequest) apiFormat(e Engine) *api.PullRequest { } if pr.Status != PullRequestStatusChecking { - mergeable := pr.Status != PullRequestStatusConflict && !pr.IsWorkInProgress() + mergeable := !(pr.Status == PullRequestStatusConflict || pr.Status == PullRequestStatusError) && !pr.IsWorkInProgress() apiPullRequest.Mergeable = mergeable } if pr.HasMerged { |