doctormo / python-gitlab3

Python wrapper for the entire GitLab API
GNU Lesser General Public License v3.0
46 stars 25 forks source link

API interfaces are out of date #20

Closed samrocketman closed 7 years ago

samrocketman commented 9 years ago

The latest GitLab API create project documentation includes the optional parameter namespace_id which I would like to use. I have an open enhancement with samrocketman/gitlab-mirrors#66. Any chance you could get around to updating the API? If you like we could use this ticket to track which API interfaces are out of date.

samrocketman commented 9 years ago

@alexvh are you no longer supporting this library? If that's the case I'll need to swap your library out for something else. Please let me know.

alexvh commented 9 years ago

I've been intending to do somewhat of a rewrite for awhile, which has been making me reluctant to update it as it stands. Given the lack of progress on that though, I'll see about getting it up to date within the next few weeks.

samrocketman commented 9 years ago

Any update on improving the API compatibility with the current version of GitLab?

g3kk0 commented 9 years ago

+1

lyda commented 9 years ago

I'm also interested in this. The library is missing support for the services api and I'm spending way too much time trying to monkey patch it in.

logicminds commented 9 years ago

@alexvh has it been a few weeks yet? Are you still maintaining this? This is still an issue.

logicminds commented 9 years ago

I think the real problem is that gitlab now has an API for creating projects without needed the user. So we just need to add this new api call. I can attempt to patch this but my python is weak.

Create project
Creates a new project owned by the authenticated user.

POST /projects
Parameters:

name (required) - new project name
path (optional) - custom repository name for new project. By default generated based on name
namespace_id (optional) - namespace for the new project (defaults to user)
description (optional) - short project description
issues_enabled (optional)
merge_requests_enabled (optional)
wiki_enabled (optional)
snippets_enabled (optional)
public (optional) - if true same as setting visibility_level = 20
visibility_level (optional)
import_url (optional)
ssbarnea commented 9 years ago

Damn, disappointed to find out that more than an year after, the ability to create project in a namespace is still missing from the library.

Is anyone using another library? Or should I just rely on curl itself.

logicminds commented 9 years ago

Actually, one can create a project in a namespace without any updates to this api. This api allows the passing of any number of arguments and namespace_id can be one of them.

Example below:

project_options={
    'issues_enabled': options.issues,
    'wall_enabled': options.wall,
    'merge_requests_enabled': options.merge,
    'wiki_enabled': options.wiki,
    'snippets_enabled': options.snippets,
    'public': options.public,
    'namespace_id': git.find_group(name=gitlab_namespace).id,

  }
  print >> stderr, "Creating new project %s" % pname
  git.add_project(pname,description=description,**project_options)
doctormo commented 7 years ago

I believe this bug is out of date now since the api supports namespace_id on projects (although there's plenty of other api cruft still there)