Skip to content

Commit 4724c50

Browse files
committed
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
1 parent 0986c93 commit 4724c50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitlab/v4/objects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3716,8 +3716,8 @@ class ProjectVariableManager(CRUDMixin, RESTManager):
37163716
_path = "/projects/%(project_id)s/variables"
37173717
_obj_cls = ProjectVariable
37183718
_from_parent_attrs = {"project_id": "id"}
3719-
_create_attrs = (("key", "value"), tuple())
3720-
_update_attrs = (("key", "value"), tuple())
3719+
_create_attrs = (("key", "value"), ("protected", "variable_type"))
3720+
_update_attrs = (("key", "value"), ("protected", "variable_type"))
37213721

37223722

37233723
class ProjectService(SaveMixin, ObjectDeleteMixin, RESTObject):

0 commit comments

Comments
 (0)