mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Only update merge_base in checker if not already merged (#10908)
Fix #10766 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
		| @@ -61,7 +61,7 @@ func checkAndUpdateStatus(pr *models.PullRequest) { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	if !has { | 	if !has { | ||||||
| 		if err := pr.UpdateCols("merge_base", "status", "conflicted_files"); err != nil { | 		if err := pr.UpdateColsIfNotMerged("merge_base", "status", "conflicted_files"); err != nil { | ||||||
| 			log.Error("Update[%d]: %v", pr.ID, err) | 			log.Error("Update[%d]: %v", pr.ID, err) | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -120,7 +120,7 @@ func ChangeTargetBranch(pr *models.PullRequest, doer *models.User, targetBranch | |||||||
| 	if pr.Status == models.PullRequestStatusChecking { | 	if pr.Status == models.PullRequestStatusChecking { | ||||||
| 		pr.Status = models.PullRequestStatusMergeable | 		pr.Status = models.PullRequestStatusMergeable | ||||||
| 	} | 	} | ||||||
| 	if err := pr.UpdateCols("status, conflicted_files, base_branch"); err != nil { | 	if err := pr.UpdateColsIfNotMerged("merge_base", "status", "conflicted_files", "base_branch"); err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user