Skip to content

project.fork() doesn't exist #136

@vilhelmen

Description

@vilhelmen

Not sure if it's an oversight, or you just haven't gotten to it (this lib is really helpful and I appreciate all the work!), but project.fork() doesn't seem to exist as the docs suggest:

fork = gl.project_forks.create(project_id=1)
# or
fork = project.fork()
In [150]: proj = gl.projects.get('test_grp/asdf')

In [151]: proj.fork()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-151-4be540ada96e> in <module>()
----> 1 proj.fork()

AttributeError: 'Project' object has no attribute 'fork'

Edit:
I also noticed that the parameter for project_forks.create() is a data dictionary, not a project_id, so the doc should be

fork = gl.project_forks.create({'project_id': 1}) 

instead of

fork = gl.project_forks.create(project_id=1)

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