1{{ define "repo/fragments/compareAllowPull" }}
2 <div
3 class="flex items-baseline justify-normal gap-4"
4 id="allow-pull"
5 hx-oob-swap="true"
6 >
7 <p>
8 This comparison can be turned into a pull request to be reviewed and
9 discussed.
10 </p>
11
12 {{ $newPullUrl := printf "/%s/pulls/new?strategy=branch&targetBranch=%s&sourceBranch=%s" .RepoInfo.FullName .Base .Head }}
13
14
15 <div class="flex justify-start items-center gap-2 mt-2">
16 <a
17 href="{{ $newPullUrl }}"
18 class="btn flex items-center gap-2 no-underline hover:no-underline"
19 >
20 {{ i "git-pull-request-create" "w-4 h-4" }}
21 create pull
22 <span id="create-pull-spinner" class="group">
23 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }}
24 </span>
25 </a>
26 </div>
27 </div>
28{{ end }}