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
39 <label>configure your pull request</label>
40
41 <p>First, choose a target branch on {{ .RepoInfo.FullName }}.</p>
42 <div class="pb-2">
43 <select
44 required
45 name="targetBranch"
46 class="p-1 border border-gray-200 bg-white dark:bg-gray-700 dark:text-white dark:border-gray-600"
47 >
48 <option disabled selected>target branch</option>
49 {{ range .Branches }}
50 <option value="{{ .Reference.Name }}" class="py-1">
51 {{ .Reference.Name }}
52 </option>
53 {{ end }}
54 </select>
55 </div>
56
57 <p>Then, choose a pull strategy.</p>
58 <nav class="flex space-x-4 items-end">
59 <button
60 type="button"
61 class="px-3 py-2 pb-2 btn"
62 hx-get="/{{ .RepoInfo.FullName }}/pulls/new/patch-upload"
63 hx-target="#patch-strategy"
64 hx-swap="innerHTML"
65 >
66 paste patch
67 </button>
68
69 {{ if .RepoInfo.Roles.IsPushAllowed }}
70 <span class="text-sm text-gray-500 dark:text-gray-400 pb-2">
71 or
72 </span>
73 <button
74 type="button"
75 class="px-3 py-2 pb-2 btn"
76 hx-get="/{{ .RepoInfo.FullName }}/pulls/new/compare-branches"
77 hx-target="#patch-strategy"
78 hx-swap="innerHTML"
79 >
80 compare branches
81 </button>
82 {{ end }}
83
84 <span class="text-sm text-gray-500 dark:text-gray-400 pb-2">
85 or
86 </span>
87 <button
88 type="button"
89 class="px-3 py-2 pb-2 btn"
90 hx-get="/{{ .RepoInfo.FullName }}/pulls/new/compare-forks"
91 hx-target="#patch-strategy"
92 hx-swap="innerHTML"
93 >
94 compare forks
95 </button>
96 </nav>
97
98 <section id="patch-strategy">
99 {{ template "fragments/pullPatchUpload" . }}
100 </section>
101
102 <div class="flex justify-start items-center gap-2 mt-4">
103 <button type="submit" class="btn flex items-center gap-2">
104 {{ i "git-pull-request-create" "w-4 h-4" }}
105 create pull
106 </button>
107 </div>
108
109 </div>
110 <div id="pull" class="error dark:text-red-300"></div>
111 </form>
112{{ end }}
113
114{{ define "repoAfter" }}
115<div id="patch-preview" class="error dark:text-red-300"></div>
116{{ end }}