Skip to content
Snippets Groups Projects
Commit 5eb00e72 authored by Andreas Tille's avatar Andreas Tille
Browse files

Sorted list for group names, remove use path directly from loop, typo in group name

parent e26aa67b
No related branches found
No related tags found
No related merge requests found
......@@ -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'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment