Skip to content

Commit 1e1ad7a

Browse files
zeripathThomas Desveaux
authored and
Thomas Desveaux
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 21cdd74 commit 1e1ad7a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

services/pull/patch.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ func checkConflicts(ctx context.Context, pr *issues_model.PullRequest, gitRepo *
306306
log.Debug("Unable to get base tree for PR[%d] %s/%s#%d. Error: %v", pr.ID, pr.BaseRepo.OwnerName, pr.BaseRepo.Name, pr.Index, err)
307307
return false, err
308308
}
309+
pr.Status = models.PullRequestStatusMergeable
310+
pr.ConflictedFiles = []string{}
311+
309312
if treeHash == baseTree.ID.String() {
310313
log.Debug("PullRequest[%d]: Patch is empty - ignoring", pr.ID)
311314
pr.Status = issues_model.PullRequestStatusEmpty

0 commit comments

Comments
 (0)