Skip to content
Snippets Groups Projects
Commit 77603d8c authored by Sam Gleske's avatar Sam Gleske Committed by Git Mirror
Browse files

Patched critical pagination bug in upstream lib

parent 4bc9cb7c
No related branches found
No related tags found
No related merge requests found
gitlab-mirrors v0.2.5
* Fixed a critical bug with pagination when user can view more projects than 20.
* Had to patch upstream python-gitlab library for this functionality.
gitlab-mirrors v0.2.4
* Fixing critical git svn mirror bug.
......
......@@ -52,9 +52,12 @@ def findgroup(gname):
exit(1)
def findproject(gname,pname):
for project in git.getProjects():
if project['namespace']['name'] == gname and project['name'] == pname:
return project
page=1
while len(git.getProjects(page=page)) > 0:
for project in git.getProjects(page=page):
if project['namespace']['name'] == gname and project['name'] == pname:
return project
page += 1
else:
return False
......@@ -68,6 +71,7 @@ def createproject(pname):
description=options.desc
new_project=git.createProject(pname,description=description,issues_enabled=str(int(options.issues)),wall_enabled=str(int(options.wall)),merge_requests_enabled=str(int(options.merge)),wiki_enabled=str(int(options.wiki)),snippets_enabled=str(int(options.snippets)),public=str(int(options.public)))
new_project=findproject(gitlab_user,pname)
print new_project
new_project=git.moveProject(found_group['id'],new_project['id'])
if findproject(gitlab_namespace,pname):
return findproject(gitlab_namespace,pname)
......
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