Skip to content
GitLab
Menu
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
d8ac688d
Commit
d8ac688d
authored
Jul 30, 2021
by
Guilhem Saurel
Browse files
get_source_display → lower
parent
1bd5bde0
Pipeline
#15413
passed with stage
in 6 minutes and 7 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
d8ac688d
...
...
@@ -174,8 +174,8 @@ class Forge(Links, NamedModel):
pass
def
get_projects
(
self
):
getattr
(
self
,
f
'get_namespaces_
{
self
.
get_source_display
()
}
'
)()
return
getattr
(
self
,
f
'get_projects_
{
self
.
get_source_display
()
}
'
)()
getattr
(
self
,
f
'get_namespaces_
{
self
.
get_source_display
()
.
lower
()
}
'
)()
return
getattr
(
self
,
f
'get_projects_
{
self
.
get_source_display
()
.
lower
()
}
'
)()
def
get_projects_github
(
self
):
for
org
in
Namespace
.
objects
.
filter
(
group
=
True
):
...
...
@@ -587,7 +587,7 @@ class Repo(TimeStampedModel):
self
.
archived
=
True
self
.
save
()
else
:
return
getattr
(
self
,
f
'api_update_
{
self
.
forge
.
get_source_display
()
}
'
)(
data
)
return
getattr
(
self
,
f
'api_update_
{
self
.
forge
.
get_source_display
()
.
lower
()
}
'
)(
data
)
def
api_update_gitlab
(
self
,
data
):
update_gitlab
(
self
.
forge
,
data
)
...
...
@@ -639,7 +639,7 @@ class Repo(TimeStampedModel):
return
main_branch
.
behind
if
main_branch
is
not
None
else
0
def
get_builds
(
self
):
return
getattr
(
self
,
f
'get_builds_
{
self
.
forge
.
get_source_display
()
}
'
)()
return
getattr
(
self
,
f
'get_builds_
{
self
.
forge
.
get_source_display
()
.
lower
()
}
'
)()
def
get_builds_gitlab
(
self
):
for
pipeline
in
self
.
api_list
(
'/pipelines'
,
limit
=
2
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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