From ad842fd116e35ac5dfee20a52f6ad3ffd9b264f4 Mon Sep 17 00:00:00 2001 From: johannges Date: Tue, 6 Feb 2024 10:49:34 +0100 Subject: [PATCH] =?UTF-8?q?[#1876]=20=E2=9C=A8=20Instance-level=20CI/CD=20?= =?UTF-8?q?variables=20API:=20add=20description=20#1876?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added Description Field for Instance Variables --- instance_variables.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/instance_variables.go b/instance_variables.go index c376fd5cf..58eef2b27 100644 --- a/instance_variables.go +++ b/instance_variables.go @@ -42,6 +42,7 @@ type InstanceVariable struct { Protected bool `json:"protected"` Masked bool `json:"masked"` Raw bool `json:"raw"` + Description string `json:"description"` } func (v InstanceVariable) String() string { @@ -105,10 +106,11 @@ func (s *InstanceVariablesService) GetVariable(key string, options ...RequestOpt type CreateInstanceVariableOptions struct { Key *string `url:"key,omitempty" json:"key,omitempty"` Value *string `url:"value,omitempty" json:"value,omitempty"` - VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"` - Protected *bool `url:"protected,omitempty" json:"protected,omitempty"` + Description *string `url:"description,omitempty" json:"description,omitempty"` Masked *bool `url:"masked,omitempty" json:"masked,omitempty"` + Protected *bool `url:"protected,omitempty" json:"protected,omitempty"` Raw *bool `url:"raw,omitempty" json:"raw,omitempty"` + VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"` } // CreateVariable creates a new instance level CI variable. @@ -139,10 +141,11 @@ func (s *InstanceVariablesService) CreateVariable(opt *CreateInstanceVariableOpt // https://docs.gitlab.com/ee/api/instance_level_ci_variables.html#update-instance-variable type UpdateInstanceVariableOptions struct { Value *string `url:"value,omitempty" json:"value,omitempty"` - VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"` - Protected *bool `url:"protected,omitempty" json:"protected,omitempty"` + Description *string `url:"description,omitempty" json:"description,omitempty"` Masked *bool `url:"masked,omitempty" json:"masked,omitempty"` + Protected *bool `url:"protected,omitempty" json:"protected,omitempty"` Raw *bool `url:"raw,omitempty" json:"raw,omitempty"` + VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"` } // UpdateVariable updates the position of an existing