diff options
author | zeripath <art27@cantab.net> | 2022-02-12 12:55:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-12 12:55:34 +0000 |
commit | c8f3672a88ce60b7b4db4c155dc071f458b24a8f (patch) | |
tree | 6cbc9e2e733af797db75cee39d2ac630459d3543 /routers | |
parent | edf85b820d4d281b281b862e3f66f950616eb62c (diff) | |
download | gitea-c8f3672a88ce60b7b4db4c155dc071f458b24a8f.tar.gz gitea-c8f3672a88ce60b7b4db4c155dc071f458b24a8f.zip |
Always set PullRequestWorkInProgressPrefixes in PrepareViewPullInfo (#18713) (#18737)
Backport #18713
Move setting PullRequestWorkInProgressPrefixes to the start of PrepareViewPullInfo.
Fix #18706
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'routers')
-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 6e68fd0c69..e9364ce654 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -392,6 +392,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 @@ -575,8 +577,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() |