From 0986c93177cde1f3be77d4f73314c37b14bba011 Mon Sep 17 00:00:00 2001 From: jo Date: Thu, 12 Dec 2019 17:24:52 +0100 Subject: feat: add variable_type to groups ci variables This adds the ci variables types for create/update requests. See https://docs.gitlab.com/ee/api/group_level_variables.html#create-variable --- gitlab/v4/objects.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gitlab/v4/objects.py') diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index 89e3259..f25a1df 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -1184,8 +1184,8 @@ class GroupVariableManager(CRUDMixin, RESTManager): _path = "/groups/%(group_id)s/variables" _obj_cls = GroupVariable _from_parent_attrs = {"group_id": "id"} - _create_attrs = (("key", "value"), ("protected",)) - _update_attrs = (("key", "value"), ("protected",)) + _create_attrs = (("key", "value"), ("protected", "variable_type")) + _update_attrs = (("key", "value"), ("protected", "variable_type")) class Group(SaveMixin, ObjectDeleteMixin, RESTObject): -- cgit v1.2.1 From 4724c50e9ec0310432c70f07079b1e03ab3cc666 Mon Sep 17 00:00:00 2001 From: jo Date: Thu, 12 Dec 2019 17:26:24 +0100 Subject: feat: add variable_type/protected to projects ci variables This adds the ci variables types and protected flag for create/update requests. See https://docs.gitlab.com/ee/api/project_level_variables.html#create-variable --- gitlab/v4/objects.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gitlab/v4/objects.py') diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index f25a1df..3be8846 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -3716,8 +3716,8 @@ class ProjectVariableManager(CRUDMixin, RESTManager): _path = "/projects/%(project_id)s/variables" _obj_cls = ProjectVariable _from_parent_attrs = {"project_id": "id"} - _create_attrs = (("key", "value"), tuple()) - _update_attrs = (("key", "value"), tuple()) + _create_attrs = (("key", "value"), ("protected", "variable_type")) + _update_attrs = (("key", "value"), ("protected", "variable_type")) class ProjectService(SaveMixin, ObjectDeleteMixin, RESTObject): -- cgit v1.2.1