File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1356,7 +1356,6 @@ func CompareAndPullRequestPost(ctx *context.Context) {
1356
1356
flashError , err := ctx .RenderToHTML (tplAlertDetails , map [string ]any {
1357
1357
"Message" : ctx .Tr ("repo.pulls.push_rejected" ),
1358
1358
"Summary" : ctx .Tr ("repo.pulls.new.blocked_user" ),
1359
- "Details" : "" ,
1360
1359
})
1361
1360
if err != nil {
1362
1361
ctx .ServerError ("CompareAndPullRequest.HTMLString" , err )
@@ -1367,7 +1366,6 @@ func CompareAndPullRequestPost(ctx *context.Context) {
1367
1366
flashError , err := ctx .RenderToHTML (tplAlertDetails , map [string ]any {
1368
1367
"Message" : ctx .Tr ("repo.pulls.push_rejected" ),
1369
1368
"Summary" : ctx .Tr ("repo.pulls.new.must_collaborator" ),
1370
- "Details" : "" ,
1371
1369
})
1372
1370
if err != nil {
1373
1371
ctx .ServerError ("CompareAndPullRequest.HTMLString" , err )
Original file line number Diff line number Diff line change 1
1
{{.Message}}
2
+ {{ if .Details }}
2
3
<details>
3
4
<summary>{{.Summary}}</summary>
4
- <code>
5
- {{.Details | SanitizeHTML}}
6
- </code>
5
+ <code>{{.Details | SanitizeHTML}}</code>
7
6
</details>
7
+ {{ else }}
8
+ <div>
9
+ {{ .Summary }}
10
+ </div>
11
+ {{ end }}
You can’t perform that action at this time.
0 commit comments