From 0c6db01fb41e972de8f305af253c3e26eb2c0f5f Mon Sep 17 00:00:00 2001
From: Benjamin Bertrand <benjamin.bertrand@esss.se>
Date: Thu, 22 Aug 2019 15:45:37 +0200
Subject: [PATCH] Create IOC repositories with same path as name

GitLab now accepts "." in the path

JIRA INFRA-1230 #action In Progress
---
 app/tasks.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/tasks.py b/app/tasks.py
index c771426..86ce96c 100644
--- a/app/tasks.py
+++ b/app/tasks.py
@@ -170,12 +170,11 @@ def create_ioc_repository(project_name):
         "accept": "application/json",
         "private-token": os.environ.get("GL_ACCESS_TOKEN"),
     }
-    # The repository path can't contain "."
     data = {
         "namespace_id": current_app.config["IOC_REPOSITORY_GROUP_ID"],
         "visibility": current_app.config["IOC_REPOSITORY_VISIBILITY"],
         "name": project_name,
-        "path": project_name.lower().replace(".", "_"),
+        "path": project_name,
     }
     response = requests.post(api_url + "/projects", headers=headers, json=data)
     try:
-- 
GitLab