summaryrefslogtreecommitdiffstats
path: root/services/pull/patch.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/pull/patch.go')
-rw-r--r--services/pull/patch.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/pull/patch.go b/services/pull/patch.go
index 2692d848c4..72b459bf2c 100644
--- a/services/pull/patch.go
+++ b/services/pull/patch.go
@@ -80,7 +80,7 @@ func TestPatch(pr *models.PullRequest) error {
pr.MergeBase = strings.TrimSpace(pr.MergeBase)
// 2. Check for conflicts
- if conflicts, err := checkConflicts(pr, gitRepo, tmpBasePath); err != nil || conflicts {
+ if conflicts, err := checkConflicts(pr, gitRepo, tmpBasePath); err != nil || conflicts || pr.Status == models.PullRequestStatusEmpty {
return err
}
@@ -125,8 +125,9 @@ func checkConflicts(pr *models.PullRequest, gitRepo *git.Repository, tmpBasePath
// 1a. if the size of that patch is 0 - there can be no conflicts!
if stat.Size() == 0 {
log.Debug("PullRequest[%d]: Patch is empty - ignoring", pr.ID)
- pr.Status = models.PullRequestStatusMergeable
+ pr.Status = models.PullRequestStatusEmpty
pr.ConflictedFiles = []string{}
+ pr.ChangedProtectedFiles = []string{}
return false, nil
}