Skip to content

Unable to initialize repo with readme when creating project on behalf of user #2869

@connelldave

Description

@connelldave

Description of the problem, including code/CLI snippet

When creating a project on behalf of user u as an admin, initialize_with_readme is ignored

In [32]: init_with_readme = True

In [33]: 
    ...:         project_data = {
    ...:             "name": project_name,
    ...:             "namespace_id": group_id,
    ...:             "initialize_with_readme": init_with_readme,
    ...:             "visibility": "internal",
    ...:         }

In [34]: r = u.projects.create(project_data)

In [35]: r.visibility
Out[35]: 'internal'

I think this might be because the attr is not declared in users.py like it is in projects.py?

Looks like an extension of #765 in a different object?

Expected Behavior

Repo is initialized with a default readme

Actual Behavior

Repo is not initialized

Specifications

  • python-gitlab version: tested on 3.12.0
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): v16.10.4-ee

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions