We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3416e2a commit 2b9e0b4Copy full SHA for 2b9e0b4
routers/repo/compare.go
@@ -431,11 +431,15 @@ func PrepareCompareDiff(
431
ctx.Data["IsNothingToCompare"] = true
432
if unit, err := repo.GetUnit(models.UnitTypePullRequests); err == nil {
433
config := unit.PullRequestsConfig()
434
+
435
if !config.AutodetectManualMerge {
- ctx.Data["AllowEmptyPr"] = !(baseBranch == headBranch && ctx.Repo.Repository.Name == headRepo.Name)
436
- } else {
437
- ctx.Data["AllowEmptyPr"] = false
+ allowEmptyPr := !(baseBranch == headBranch && ctx.Repo.Repository.Name == headRepo.Name)
+ ctx.Data["AllowEmptyPr"] = allowEmptyPr
438
439
+ return !allowEmptyPr
440
}
441
442
+ ctx.Data["AllowEmptyPr"] = false
443
444
return true
445
0 commit comments