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

Commit

Permalink
Merge pull request #1969 from perrze/change-VariableType-type
Browse files Browse the repository at this point in the history
fix: Change VariableType type from string to VariableTypeValue
  • Loading branch information
svanharmelen authored Jul 12, 2024
2 parents 7f1e0f7 + 3afdfad commit ec404fa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,9 @@ type PlayJobOptions struct {
// GitLab API docs:
// https://docs.gitlab.com/ee/api/jobs.html#run-a-job
type JobVariableOptions struct {
Key *string `url:"key,omitempty" json:"key,omitempty"`
Value *string `url:"value,omitempty" json:"value,omitempty"`
VariableType *string `url:"variable_type,omitempty" json:"variable_type,omitempty"`
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"`
}

// PlayJob triggers a manual action to start a job.
Expand Down
10 changes: 5 additions & 5 deletions pipeline_schedules.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,9 @@ func (s *PipelineSchedulesService) RunPipelineSchedule(pid interface{}, schedule
// GitLab API docs:
// https://docs.gitlab.com/ee/api/pipeline_schedules.html#create-a-new-pipeline-schedule
type CreatePipelineScheduleVariableOptions struct {
Key *string `url:"key" json:"key"`
Value *string `url:"value" json:"value"`
VariableType *string `url:"variable_type,omitempty" json:"variable_type,omitempty"`
Key *string `url:"key" json:"key"`
Value *string `url:"value" json:"value"`
VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"`
}

// CreatePipelineScheduleVariable creates a pipeline schedule variable.
Expand Down Expand Up @@ -330,8 +330,8 @@ func (s *PipelineSchedulesService) CreatePipelineScheduleVariable(pid interface{
// GitLab API docs:
// https://docs.gitlab.com/ee/api/pipeline_schedules.html#edit-a-pipeline-schedule-variable
type EditPipelineScheduleVariableOptions struct {
Value *string `url:"value" json:"value"`
VariableType *string `url:"variable_type,omitempty" json:"variable_type,omitempty"`
Value *string `url:"value" json:"value"`
VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"`
}

// EditPipelineScheduleVariable creates a pipeline schedule variable.
Expand Down
12 changes: 6 additions & 6 deletions pipelines.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ type PipelinesService struct {
//
// GitLab API docs: https://docs.gitlab.com/ee/api/pipelines.html
type PipelineVariable struct {
Key string `json:"key"`
Value string `json:"value"`
VariableType string `json:"variable_type"`
Key string `json:"key"`
Value string `json:"value"`
VariableType VariableTypeValue `json:"variable_type"`
}

// Pipeline represents a GitLab pipeline.
Expand Down Expand Up @@ -309,9 +309,9 @@ type CreatePipelineOptions struct {
//
// GitLab API docs: https://docs.gitlab.com/ee/api/pipelines.html#create-a-new-pipeline
type PipelineVariableOptions struct {
Key *string `url:"key,omitempty" json:"key,omitempty"`
Value *string `url:"value,omitempty" json:"value,omitempty"`
VariableType *string `url:"variable_type,omitempty" json:"variable_type,omitempty"`
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"`
}

// CreatePipeline creates a new project pipeline.
Expand Down

0 comments on commit ec404fa

Please sign in to comment.