Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

[#1876] ✨ Instance-level CI/CD variables API: add description #1877

Merged
merged 1 commit into from
Feb 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions instance_variables.go
Original file line number Diff line number Diff line change
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
Loading