this repo has no description
1{{ define "title" }}new pull | {{ .RepoInfo.FullName }}{{ end }}
2
3{{ define "repoContent" }}
4 <section class="prose dark:prose-invert">
5 <p>
6 This is v1 of the pull request flow. Paste your patch in the form below.
7 Here are the steps to get you started:
8 <ul class="list-decimal pl-10 space-y-2 text-gray-700 dark:text-gray-300">
9 <li class="leading-relaxed">Clone this repository.</li>
10 <li class="leading-relaxed">Make your changes in your local repository.</li>
11 <li class="leading-relaxed">Grab the diff using <code>git diff</code>.</li>
12 <li class="leading-relaxed">Paste the diff output in the form below.</li>
13 </ul>
14 </p>
15 </section>
16 <form
17 hx-post="/{{ .RepoInfo.FullName }}/pulls/new"
18 class="mt-6 space-y-6"
19 hx-swap="none"
20 >
21 <div class="flex flex-col gap-4">
22 <div>
23 <label for="title" class="dark:text-white">write a title</label>
24 <input type="text" name="title" id="title" class="w-full dark:bg-gray-700 dark:text-white dark:border-gray-600" />
25 </div>
26
27 <div>
28 <label for="body" class="dark:text-white">add a description</label>
29 <textarea
30 name="body"
31 id="body"
32 rows="6"
33 class="w-full resize-y dark:bg-gray-700 dark:text-white dark:border-gray-600"
34 placeholder="Describe your change. Markdown is supported."
35 ></textarea>
36 </div>
37
38 <div>
39 <label for="targetBranch" class="dark:text-white">configure branches</label>
40 <div class="flex flex-wrap gap-2 items-center">
41 <select
42 required
43 name="targetBranch"
44 class="p-1 border border-gray-200 bg-white dark:bg-gray-700 dark:text-white dark:border-gray-600"
45 >
46 <option disabled selected>target branch</option>
47 {{ range .Branches }}
48 <option value="{{ .Reference.Name }}" class="py-1">
49 {{ .Reference.Name }}
50 </option>
51 {{ end }}
52 </select>
53
54 {{ if .RepoInfo.Roles.IsPushAllowed }}
55 {{ i "move-left" "w-5 h-5" }}
56 <select
57 name="sourceBranch"
58 class="p-1 border border-gray-200 bg-white dark:bg-gray-700 dark:text-white dark:border-gray-600"
59 >
60 <option disabled selected>source branch</option>
61 {{ range .Branches }}
62 <option value="{{ .Reference.Name }}" class="py-1">
63 {{ .Reference.Name }}
64 </option>
65 {{ end }}
66 </select>
67 {{ end }}
68
69 </div>
70 </div>
71
72 <div class="mt-4">
73 {{ $label := "paste your patch here" }}
74 {{ $rows := 10 }}
75 {{ if .RepoInfo.Roles.IsPushAllowed }}
76 {{ $label = "or paste your patch here" }}
77 {{ $rows = 4 }}
78 {{ end }}
79
80 <label for="patch" class="dark:text-white">{{ $label }}</label>
81 <textarea
82 name="patch"
83 id="patch"
84 rows="{{$rows}}"
85 class="w-full resize-y font-mono dark:bg-gray-700 dark:text-white dark:border-gray-600"
86 placeholder="Paste your git diff output here."
87 ></textarea>
88 </div>
89
90 <div class="flex justify-end items-center gap-2">
91 <button type="submit" class="btn">create</button>
92 </div>
93
94 </div>
95 <div id="pull" class="error dark:text-red-300"></div>
96 </form>
97{{ end }}
98
99{{ define "repoAfter" }}
100<div id="patch-preview" class="error dark:text-red-300"></div>
101{{ end }}