Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
676508ce
Commit
676508ce
authored
Nov 28, 2018
by
Guilhem Saurel
Browse files
ignore branches without at least two /
parent
5e83444a
Pipeline
#1942
passed with stages
in 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
676508ce
...
...
@@ -219,6 +219,9 @@ class Project(Links, NamedModel, TimeStampedModel):
logger
.
info
(
f
'update branch
{
branch
}
'
)
if
branch
.
startswith
(
'remotes/'
):
branch
=
branch
[
8
:]
if
branch
.
count
(
'/'
)
<
2
:
logger
.
error
(
f
'wrong branch "
{
branch
}
" in
{
self
.
git_path
()
}
'
)
continue
forge
,
namespace
,
name
=
branch
.
split
(
'/'
,
maxsplit
=
2
)
namespace
,
_
=
Namespace
.
objects
.
get_or_create
(
slug
=
namespace
)
forge
=
Forge
.
objects
.
get
(
slug
=
forge
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment