Skip to content

Commit

Permalink
Merge pull request #1877 from johannges/main
Browse files Browse the repository at this point in the history
[#1876] ✨ Instance-level CI/CD variables API: add description
  • Loading branch information
svanharmelen committed Feb 10, 2024
2 parents 0f9ca4d + ad842fd commit b2e8732
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions instance_variables.go
Expand Up @@ -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 {
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b2e8732

Please sign in to comment.