Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian Blends Team
website
Commits
5eb00e72
Commit
5eb00e72
authored
6 years ago
by
Andreas Tille
Browse files
Options
Downloads
Patches
Plain Diff
Sorted list for group names, remove use path directly from loop, typo in group name
parent
e26aa67b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc/machine_readable/fetch-machine-readable_salsa.py
+6
-6
6 additions, 6 deletions
misc/machine_readable/fetch-machine-readable_salsa.py
with
6 additions
and
6 deletions
misc/machine_readable/fetch-machine-readable_salsa.py
+
6
−
6
View file @
5eb00e72
...
...
@@ -27,7 +27,7 @@ BLENDSGROUPS={ '3dprinter' : '3dprinting-team'
,
'
pkg-octave
'
:
'
pkg-octave-team
'
,
'
pkg-perl
'
:
'
perl-team
'
,
'
pkg-phototools
'
:
'
debian-phototools-team
'
,
'
pkg-r
'
:
'
pkg-
r-
team
'
,
'
pkg-r
'
:
'
r-
pkg-team
'
,
'
pkg-voip
'
:
'
pkg-voip-team
'
,
'
python-team
'
:
'
python-team
'
,
'
tryton
'
:
'
tryton-team
'
...
...
@@ -109,18 +109,18 @@ gl = gitlab.Gitlab("https://salsa.debian.org") # , private_token=SALSA_TOKEN) #
LAST_ACTIVITY
=
'
last_activity_at:
'
LAST_ACTIVITY_LENGTH
=
len
(
LAST_ACTIVITY
)
#blends_groups = get_blends_groups()
for
blend
in
BLENDSGROUPS
:
for
blend
,
gpath
in
BLENDSGROUPS
.
items
():
unchanged
,
changed
,
new
,
ignored
=
(
0
,
0
,
0
,
0
)
group
=
gl
.
groups
.
get
(
BLENDSGROUPS
[
blend
],
with_projects
=
False
,
simple
=
True
)
gpath
=
group
.
path
group
=
gl
.
groups
.
get
(
gpath
,
with_projects
=
False
,
simple
=
True
)
try
:
projects
=
group
.
projects
.
list
(
all
=
True
,
order_by
=
'
name
'
,
sort
=
'
asc
'
,
simple
=
True
)
except
gitlab
.
exceptions
.
GitlabGetError
as
err
:
print
(
"
GitlabGetError: %s - wait %s seconds
"
,
(
str
(
err
),
SLEEPUNTILRETRY
))
print
(
"
GitlabGetError: %s
when parsing group %s
- wait %s seconds
"
,
(
str
(
err
),
gpath
,
SLEEPUNTILRETRY
))
time
.
sleep
(
SLEEPUNTILRETRY
)
projects
=
group
.
projects
.
list
(
all
=
True
,
order_by
=
'
name
'
,
sort
=
'
asc
'
,
simple
=
True
)
# If Salsa is too busy do not try again
except
gitlab
.
exceptions
.
GitlabHttpError
as
err
:
print
(
"
GitlabHttpError: %s when parsing group %s - wait %s seconds
"
,
(
str
(
err
),
gpath
,
SLEEPUNTILRETRY
))
# DEBUG : only few projects to be faster
# projects = group.projects.list(page=1, per_page=10, order_by='name', sort='asc')
print
(
"
%s has %i projects (Blend name %s)
"
%
(
group
.
name
,
len
(
projects
),
blend
))
# group.attributes['id'], group.attributes['path']) # , group.attributes['description'], group.attributes['full_name'])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment