From ded9d435b081ab552d8c5d4e1f655e7b26a8be0a Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Wed, 19 Feb 2025 08:45:09 +0800 Subject: repo/contrib: Display merge request diffs --- templates/repo_contrib_one.tmpl | 83 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 templates/repo_contrib_one.tmpl (limited to 'templates/repo_contrib_one.tmpl') diff --git a/templates/repo_contrib_one.tmpl b/templates/repo_contrib_one.tmpl new file mode 100644 index 0000000..85cac10 --- /dev/null +++ b/templates/repo_contrib_one.tmpl @@ -0,0 +1,83 @@ +{{- define "repo_contrib_one" -}} + + + + {{ template "head_common" . }} + Merge requests – {{ .repo_name }} – {{ .group_name }} – {{ .global.forge_title }} + + + {{ template "header" . }} +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Merge request info
ID{{ .mr_id }}
Status{{ .mr_status }}
Title{{ .mr_title }}
Source ref{{ .mr_source_ref }}
Destination branch{{ .mr_destination_branch }}
+
+
+ {{ $destination_commit := .destination_commit }} + {{ $source_commit := .source_commit }} + {{ range .file_patches }} +
+ + +
+ {{ range .Chunks }} + {{ if eq .Operation 0 }} +
{{ .Content }}
+ {{ else if eq .Operation 1 }} +
{{ .Content }}
+ {{ else if eq .Operation 2 }} +
{{ .Content }}
+ {{ else }} +
{{ .Content }}
+ {{ end }} + {{ end }} +
+
+ {{ end }} +
+ + + +{{- end -}} -- cgit v1.2.3