diff options
author | zeripath <art27@cantab.net> | 2022-02-11 08:02:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-11 08:02:53 +0000 |
commit | 393ea86ae192325e45d7fac0fc6a277da8fb0fca (patch) | |
tree | 8ff51ec00c966fe9d43e49857208937390bf718b /routers/web/repo/pull.go | |
parent | b2b3225bd1f6d6ff519d7a464c7fcf7ff0c6bdcc (diff) | |
download | gitea-393ea86ae192325e45d7fac0fc6a277da8fb0fca.tar.gz gitea-393ea86ae192325e45d7fac0fc6a277da8fb0fca.zip |
Always set PullRequestWorkInProgressPrefixes in PrepareViewPullInfo (#18713)
Move setting PullRequestWorkInProgressPrefixes to the start of PrepareViewPullInfo.
Fix #18706
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'routers/web/repo/pull.go')
-rw-r--r-- | routers/web/repo/pull.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index 9c575165a4..1ac3e51e41 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -390,6 +390,8 @@ func PrepareMergedViewPullInfo(ctx *context.Context, issue *models.Issue) *git.C // PrepareViewPullInfo show meta information for a pull request preview page func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.CompareInfo { + ctx.Data["PullRequestWorkInProgressPrefixes"] = setting.Repository.PullRequest.WorkInProgressPrefixes + repo := ctx.Repo.Repository pull := issue.PullRequest @@ -579,8 +581,6 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.Compare ctx.Data["IsNothingToCompare"] = true } - ctx.Data["PullRequestWorkInProgressPrefixes"] = setting.Repository.PullRequest.WorkInProgressPrefixes - if pull.IsWorkInProgress() { ctx.Data["IsPullWorkInProgress"] = true ctx.Data["WorkInProgressPrefix"] = pull.GetWorkInProgressPrefix() |