Skip to content

Commit 393ea86

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

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
@@ -390,6 +390,8 @@ func PrepareMergedViewPullInfo(ctx *context.Context, issue *models.Issue) *git.C
390390

391391
// PrepareViewPullInfo show meta information for a pull request preview page
392392
func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.CompareInfo {
393+
ctx.Data["PullRequestWorkInProgressPrefixes"] = setting.Repository.PullRequest.WorkInProgressPrefixes
394+
393395
repo := ctx.Repo.Repository
394396
pull := issue.PullRequest
395397

@@ -579,8 +581,6 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.Compare
579581
ctx.Data["IsNothingToCompare"] = true
580582
}
581583

582-
ctx.Data["PullRequestWorkInProgressPrefixes"] = setting.Repository.PullRequest.WorkInProgressPrefixes
583-
584584
if pull.IsWorkInProgress() {
585585
ctx.Data["IsPullWorkInProgress"] = true
586586
ctx.Data["WorkInProgressPrefix"] = pull.GetWorkInProgressPrefix()

0 commit comments

Comments
 (0)