Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (2)
We want the full path
· 2328a204
Andreas Tille
authored
Sep 21, 2018
2328a204
parse subgroups recursively
· 857c33de
Andreas Tille
authored
Sep 22, 2018
857c33de
Show whitespace changes
Inline
Side-by-side
misc/machine_readable/fetch-machine-readable_salsa.py
View file @
857c33de
...
...
@@ -49,7 +49,6 @@ BLACKLIST = [ 'bio-linux'
,
'
website
'
]
# FIXME: Debian Perl Group is listed with only 2 projects which is definitely wrong
# FIXME: Do not assume package name is path name on Salsa (-> there are pathes like "Cave Story NX")
# just start with one team
...
...
@@ -135,6 +134,13 @@ def get_projects_of_subgroups(group):
for
project
in
sprojects
:
if
project
.
name
not
in
BLACKLIST
:
more_projects
.
append
(
project
)
# call recursively for subdirs
(
sprojects
,
valid_subgroup_names
)
=
get_projects_of_subgroups
(
real_group
)
for
project
in
sprojects
:
if
project
.
name
not
in
BLACKLIST
:
# reset group name to main group
project
.
namespace
[
'
name
'
]
=
group
.
name
more_projects
.
append
(
project
)
return
(
more_projects
,
valid_names
)
# SALSA_TOKEN=os.environ['SALSA_TOKEN']
...
...
@@ -166,12 +172,13 @@ for blend, gpath in sorted(BLENDSGROUPS.items()):
print
(
"
%i projects found in subgroups
"
%
len
(
sprojects
))
valid_group_names
.
extend
(
valid_subgroup_names
)
projects
.
extend
(
sprojects
)
source
=
''
for
project
in
projects
:
jdata
=
{}
name
=
project
.
name
jdata
[
'
blend
'
]
=
blend
jdata
[
'
project
'
]
=
name
jdata
[
'
path
'
]
=
project
.
path
jdata
[
'
path
'
]
=
project
.
path
_with_namespace
# bnd was parsed twice in 'Debian Java Maintainers'
if
project
.
namespace
[
'
name
'
]
not
in
valid_group_names
:
print
(
"
Project %s is in group
'
%s
'
and thus not in the group
'
%s
'
which is parsed here -> ignored
"
%
(
name
,
project
.
namespace
[
'
name
'
],
group
.
name
))
...
...