Commit a66fbfc7dac81e510791c2c52db6da476f04f81a

Thomas de Grivel 2021-12-10T17:36:31

do not create repository with deploy key

diff --git a/lib/kmxgit_web/templates/repository/form.html.heex b/lib/kmxgit_web/templates/repository/form.html.heex
index 814dead..de9b8b8 100644
--- a/lib/kmxgit_web/templates/repository/form.html.heex
+++ b/lib/kmxgit_web/templates/repository/form.html.heex
@@ -17,11 +17,13 @@
     <%= error_tag f, :description %>
   </div>
 
-  <div class="mb-3">
-    <%= label f, :deploy_keys, class: "form-label" %>
-    <%= textarea f, :deploy_keys, class: "form-control" %>
-    <%= error_tag f, :deploy_keys %>
-  </div>
+  <%= if @conn.assigns[:current_repository] do %>
+    <div class="mb-3">
+      <%= label f, :deploy_keys, class: "form-label" %>
+      <%= textarea f, :deploy_keys, class: "form-control" %>
+      <%= error_tag f, :deploy_keys %>
+    </div>
+  <% end %>
 
   <%= if @conn.assigns[:current_repository] do %>
     <div class="mb-3">