Commit 676508ce authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

ignore branches without at least two /

parent 5e83444a
Pipeline #1942 passed with stages
in 53 seconds
......@@ -219,6 +219,9 @@ class Project(Links, NamedModel, TimeStampedModel):'update branch {branch}')
if branch.startswith('remotes/'):
branch = branch[8:]
if branch.count('/') < 2:
logger.error(f'wrong branch "{branch}" in {self.git_path()}')
forge, namespace, name = branch.split('/', maxsplit=2)
namespace, _ = Namespace.objects.get_or_create(slug=namespace)
forge = Forge.objects.get(slug=forge)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment