Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

groups.search('group') method is documented but it is not present #255

Closed
aruiz opened this issue May 7, 2017 · 4 comments
Closed

groups.search('group') method is documented but it is not present #255

aruiz opened this issue May 7, 2017 · 4 comments

Comments

@aruiz
Copy link

aruiz commented May 7, 2017

when I try to use the documented groups.search() method I get this error:

prj = self.gl.groups.search(grp)[0].projects.search(repo)[0]
AttributeError: 'GroupProjectManager' object has no attribute 'search'

@gpocentek
Copy link
Contributor

The error is not related to the Group manager, but to the GroupProject manager.

There should be a search method on this object anyway, so this is still a bug.

@gpocentek
Copy link
Contributor

Note: this change will probably not give you the result you expect, because the search method doesn't consider the previous search result (group_id), i.e using self.gl.projects.search(repo)[0] will give the same (and probably unwanted) result.

https://gitlab.com/gitlab-org/gitlab-ce/issues/23185 is probably what's needed here.

@hjdr4
Copy link

hjdr4 commented Jul 12, 2017

Using API v4:
self.group=self.gitlabApi.groups.search(self.project.name)[0]
=>
AttributeError, 'GroupManager' object has no attribute 'search'

How do I get a group by name ?

*v3 group visibility does not work

@adinriv
Copy link

adinriv commented Feb 20, 2019

You can do a search with gl.groups.list(search='group-name'). But that is not documented. I found it in another comment.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants