mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Backport #18713 Move setting PullRequestWorkInProgressPrefixes to the start of PrepareViewPullInfo. Fix #18706 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		@@ -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()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user