From 581227f20a84ba9358c19b976c2f94e4ace9d86e Mon Sep 17 00:00:00 2001 From: 0ko <0ko@noreply.codeberg.org> Date: Sat, 10 Jan 2026 23:44:42 +0100 Subject: [PATCH] chore(ui): cleanup PR checks area (#10768) Mostly a UI followup to https://codeberg.org/forgejo/forgejo/pulls/9397 with a few fixes. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10768 Reviewed-by: Beowulf Co-authored-by: 0ko <0ko@noreply.codeberg.org> Co-committed-by: 0ko <0ko@noreply.codeberg.org> --- templates/repo/issue/view_content/pull.tmpl | 10 ++-- .../view_content/update_branch_by_merge.tmpl | 4 +- templates/repo/pulls/trust.tmpl | 46 ++++++++----------- 3 files changed, 26 insertions(+), 34 deletions(-) diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index 8198c6f98d..b5cce664a3 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -36,7 +36,7 @@ {{if .Issue.PullRequest.HasMerged}} {{if .IsPullBranchDeletable}}
-
+

{{ctx.Locale.Tr "repo.pulls.merged_success"}}

@@ -44,14 +44,14 @@ {{ctx.Locale.Tr "repo.pulls.merged_info_text" (HTMLFormat "%s" .HeadTarget)}}
-
+
{{end}} {{else if .Issue.IsClosed}}
-
+

{{ctx.Locale.Tr "repo.pulls.closed"}}

{{if and .IsPullBranchDeletable (not .IsPullRequestBroken)}} -
+
{{end}} @@ -85,7 +85,7 @@
{{else if .IsPullWorkInProgress}}
-
+
{{svg "octicon-x"}} {{ctx.Locale.Tr "repo.pulls.cannot_merge_work_in_progress"}}
diff --git a/templates/repo/issue/view_content/update_branch_by_merge.tmpl b/templates/repo/issue/view_content/update_branch_by_merge.tmpl index 3e8b691784..fb3051e56e 100644 --- a/templates/repo/issue/view_content/update_branch_by_merge.tmpl +++ b/templates/repo/issue/view_content/update_branch_by_merge.tmpl @@ -1,11 +1,11 @@ {{if and (gt $.Issue.PullRequest.CommitsBehind 0) (not $.Issue.IsClosed) (not $.Issue.PullRequest.IsChecking) (not $.IsPullFilesConflicted) (not $.IsPullRequestBroken)}}
-
+
{{svg "octicon-alert"}} {{ctx.Locale.Tr "repo.pulls.outdated_with_base_branch"}}
-
+
{{if and $.UpdateAllowed $.UpdateByRebaseAllowed}}
diff --git a/templates/repo/pulls/trust.tmpl b/templates/repo/pulls/trust.tmpl index f715f27bbf..68e5b692ee 100644 --- a/templates/repo/pulls/trust.tmpl +++ b/templates/repo/pulls/trust.tmpl @@ -14,45 +14,37 @@ Template Attributes:
-
+
{{ctx.Locale.Tr "repo.pulls.poster_is_trusted" "https://forgejo.org/docs/latest/user/actions/security-pull-request/"}}
-
-
- - -
-
+
+ + +
{{else if and .PullRequestPosterIsNotTrustedWithActions .SomePullRequestRunsNeedApproval}}
-
+
{{svg "octicon-alert" 16 "text red"}} {{ctx.Locale.Tr "repo.pulls.poster_requires_approval" "https://forgejo.org/docs/latest/user/actions/security-pull-request/"}}
{{if .UserCanDelegateTrustWithPullRequest}} -
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
+
+
+ + +
+
+ + +
+
+ + +
{{end}}