Skip to content

create group task doesn't compile #21

@angel-git

Description

@angel-git
def gitlab_creategroup(self, variables):
        group_spec = {
            "name": variables["group_name"],
            "path": variables["path"],
            "visibility": variables["visibility"],
        }
        for optional_spec in ["description", "parent_id"]:
            if optional_spec in variables.keys():
                group_spec[optional_spec] = variables[optional_spec]
        # content = Client.build_content(group_spec)
        content = json.dumps(proj_spec)
        endpoint = "/api/v4/groups?private_token={0}".format(
            self.get_gitlab_api_key(variables)
        )
        data = self.handle_response(
            self.get_request(variables).post(endpoint, content, contentType="application/json")
        )
        return {"group_id": str(data["id"])}

content = json.dumps(proj_spec) should be content = json.dumps(group_spec)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions