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>choose your pull strategy</label>
40 <nav class="flex space-x-4">
41 <button
42 type="button"
43 class="px-3 py-2 pb-2 btn"
44 hx-get="/{{ .RepoInfo.FullName }}/pulls/new/patch-upload"
45 hx-target="#patch-strategy"
46 hx-swap="innerHTML"
47 >
48 paste patch
49 </button>
50
51 {{ if .RepoInfo.Roles.IsPushAllowed }}
52 <button
53 type="button"
54 class="px-3 py-2 pb-2 btn"
55 hx-get="/{{ .RepoInfo.FullName }}/pulls/new/compare-branches"
56 hx-target="#patch-strategy"
57 hx-swap="innerHTML"
58 >
59 compare branches
60 </button>
61 {{ end }}
62 <button
63 type="button"
64 class="px-3 py-2 pb-2 btn"
65 hx-get="/{{ .RepoInfo.FullName }}/pulls/new/compare-forks"
66 hx-target="#patch-strategy"
67 hx-swap="innerHTML"
68 >
69 compare forks
70 </button>
71 </nav>
72
73 <section id="patch-strategy">
74 {{ template "fragments/pullPatchUpload" . }}
75 </section>
76
77 <div class="flex justify-start items-center gap-2">
78 <button type="submit" class="btn flex items-center gap-2">
79 {{ i "git-pull-request-create" "w-4 h-4" }}
80 create pull
81 </button>
82 </div>
83
84 </div>
85 <div id="pull" class="error dark:text-red-300"></div>
86 </form>
87{{ end }}
88
89{{ define "repoAfter" }}
90<div id="patch-preview" class="error dark:text-red-300"></div>
91{{ end }}