aboutsummaryrefslogtreecommitdiffstats
path: root/models/pull.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-01-10 00:14:14 +0000
committerLunny Xiao <xiaolunwen@gmail.com>2020-01-10 08:14:14 +0800
commit17b844a3ecbe1dd74bbde750e6a0adea07d92caa (patch)
treefcb344d7a72a0eab3bf1028e6a4975bc42e528a0 /models/pull.go
parent6c46a563607de96f11a4248d3656cb158eba80f7 (diff)
downloadgitea-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.go3
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 {