Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gitlab-mirrors
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wonko
gitlab-mirrors
Commits
8c440591
Commit
8c440591
authored
11 years ago
by
Sam Gleske
Browse files
Options
Downloads
Patches
Plain Diff
Fixed pagination bug
with group namespace resolution. upstream merge request for python-gitlab.
parent
cf185e7d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/manage_gitlab_project.py
+9
-7
9 additions, 7 deletions
lib/manage_gitlab_project.py
with
9 additions
and
7 deletions
lib/manage_gitlab_project.py
+
9
−
7
View file @
8c440591
...
...
@@ -45,14 +45,16 @@ git=gitlab.Gitlab(gitlab_url,token_secret)
def
findgroup
(
gname
):
#Locate the group
found_group
=
False
for
group
in
git
.
getGroups
():
if
group
[
'
name
'
]
==
gname
:
return
group
page
=
1
while
len
(
git
.
getGroups
(
page
=
page
))
>
0
:
for
group
in
git
.
getGroups
(
page
=
page
):
if
group
[
'
name
'
]
==
gname
:
return
group
page
+=
1
else
:
if
not
found_
group
:
print
>>
stderr
,
"
Project namespace (user or group) not found or user does not have permission of existing group
.
"
exit
(
1
)
print
>>
stderr
,
"
Project namespace (user or group) not found or user does not have permission of existing
group
.
"
print
>>
stderr
,
"
gitlab-mirrors will not automatically create the project namespace
.
"
exit
(
1
)
def
findproject
(
gname
,
pname
):
page
=
1
...
...
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