From b3aeb3b6786b16a4dd0d478087b0b8ce18c0542c Mon Sep 17 00:00:00 2001 From: johannges Date: Wed, 31 Jan 2024 11:12:14 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Group-level=20CI/CD=20variables=20A?= =?UTF-8?q?PI:=20add=20description?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group_variables.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/group_variables.go b/group_variables.go index ead4d0a99..aa2531843 100644 --- a/group_variables.go +++ b/group_variables.go @@ -43,6 +43,7 @@ type GroupVariable struct { Masked bool `json:"masked"` Raw bool `json:"raw"` EnvironmentScope string `json:"environment_scope"` + Description string `json:"description"` } func (v GroupVariable) String() string { @@ -114,11 +115,12 @@ func (s *GroupVariablesService) GetVariable(gid interface{}, key string, options type CreateGroupVariableOptions 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"` + EnvironmentScope *string `url:"environment_scope,omitempty" json:"environment_scope,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"` - EnvironmentScope *string `url:"environment_scope,omitempty" json:"environment_scope,omitempty"` + VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"` } // CreateVariable creates a new group variable. @@ -153,11 +155,12 @@ func (s *GroupVariablesService) CreateVariable(gid interface{}, opt *CreateGroup // https://docs.gitlab.com/ee/api/group_level_variables.html#update-variable type UpdateGroupVariableOptions 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"` + EnvironmentScope *string `url:"environment_scope,omitempty" json:"environment_scope,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"` - EnvironmentScope *string `url:"environment_scope,omitempty" json:"environment_scope,omitempty"` + VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"` } // UpdateVariable updates the position of an existing