summaryrefslogtreecommitdiffstats
path: root/models/pull.go
diff options
context:
space:
mode:
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 {