Skip to content

Commit b06b088

Browse files
committed
Ensure that conflict status is reset if there are no conflicts
The ConflictedFiles status should always be reset if there are no conflicts this prevents conflicted files being left over. Fix go-gitea#17204 Signed-off-by: Andrew Thornton <[email protected]>
1 parent 393ea86 commit b06b088

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

services/pull/patch.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,12 @@ func checkConflicts(ctx context.Context, pr *models.PullRequest, gitRepo *git.Re
287287
if err != nil {
288288
return false, err
289289
}
290+
pr.Status = models.PullRequestStatusMergeable
291+
pr.ConflictedFiles = []string{}
292+
290293
if treeHash == baseTree.ID.String() {
291294
log.Debug("PullRequest[%d]: Patch is empty - ignoring", pr.ID)
292295
pr.Status = models.PullRequestStatusEmpty
293-
pr.ConflictedFiles = []string{}
294296
pr.ChangedProtectedFiles = []string{}
295297
}
296298

0 commit comments

Comments
 (0)