Skip to content

Commit c8f3672

Browse files
authored
Always set PullRequestWorkInProgressPrefixes in PrepareViewPullInfo (#18713) (#18737)
Backport #18713 Move setting PullRequestWorkInProgressPrefixes to the start of PrepareViewPullInfo. Fix #18706 Signed-off-by: Andrew Thornton <[email protected]>
1 parent edf85b8 commit c8f3672

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routers/web/repo/pull.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,8 @@ func PrepareMergedViewPullInfo(ctx *context.Context, issue *models.Issue) *git.C
392392

393393
// PrepareViewPullInfo show meta information for a pull request preview page
394394
func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.CompareInfo {
395+
ctx.Data["PullRequestWorkInProgressPrefixes"] = setting.Repository.PullRequest.WorkInProgressPrefixes
396+
395397
repo := ctx.Repo.Repository
396398
pull := issue.PullRequest
397399

@@ -575,8 +577,6 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.Compare
575577
ctx.Data["IsNothingToCompare"] = true
576578
}
577579

578-
ctx.Data["PullRequestWorkInProgressPrefixes"] = setting.Repository.PullRequest.WorkInProgressPrefixes
579-
580580
if pull.IsWorkInProgress() {
581581
ctx.Data["IsPullWorkInProgress"] = true
582582
ctx.Data["WorkInProgressPrefix"] = pull.GetWorkInProgressPrefix()

0 commit comments

Comments
 (0)