Skip to content

Commit 706772d

Browse files
committed
fix
1 parent d88b012 commit 706772d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

routers/web/repo/issue_page_meta.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ func retrieveRepoIssueMetaData(ctx *context.Context, repo *repo_model.Repository
7979
return data
8080
}
8181

82+
// it sets "Branches" template data,
83+
// it is used to render the "edit PR target branches" dropdown, and the "branch selector" in the issue's sidebar.
84+
PrepareBranchList(ctx)
85+
if ctx.Written() {
86+
return data
87+
}
88+
8289
data.CanModifyIssueOrPull = ctx.Repo.CanWriteIssuesOrPulls(isPull) && !ctx.Repo.Repository.IsArchived
8390
if !data.CanModifyIssueOrPull {
8491
return data
@@ -99,11 +106,6 @@ func retrieveRepoIssueMetaData(ctx *context.Context, repo *repo_model.Repository
99106
return data
100107
}
101108

102-
PrepareBranchList(ctx)
103-
if ctx.Written() {
104-
return data
105-
}
106-
107109
ctx.Data["CanCreateIssueDependencies"] = ctx.Repo.CanCreateIssueDependencies(ctx, ctx.Doer, isPull)
108110
return data
109111
}

0 commit comments

Comments
 (0)