From 81904ba7cf6e90ee49b174181e97e84d3c78305c Mon Sep 17 00:00:00 2001 From: perrze Date: Tue, 9 Jul 2024 13:17:01 +0200 Subject: [PATCH 1/2] fix: VariableType type in pipelines.go --- pipelines.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pipelines.go b/pipelines.go index 6dee9dfe7..3f2448447 100644 --- a/pipelines.go +++ b/pipelines.go @@ -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. @@ -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. From 3afdfadfa285f9f81cb452fa8f376b47540fa10d Mon Sep 17 00:00:00 2001 From: perrze Date: Tue, 9 Jul 2024 13:22:16 +0200 Subject: [PATCH 2/2] fix: VariableType type in jobs.go & pipeline_schedules.go --- jobs.go | 6 +++--- pipeline_schedules.go | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/jobs.go b/jobs.go index 9ad006658..f25c020f1 100644 --- a/jobs.go +++ b/jobs.go @@ -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. diff --git a/pipeline_schedules.go b/pipeline_schedules.go index 85f32c3f6..51477f21b 100644 --- a/pipeline_schedules.go +++ b/pipeline_schedules.go @@ -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. @@ -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.