Skip to content

Commit

Permalink
Merge pull request #1494 from xanzy/bugfix/pipeline-variable
Browse files Browse the repository at this point in the history
Introduce a PipelineVariableOptions struct
  • Loading branch information
svanharmelen committed Jun 7, 2022
2 parents 2a8940c + 938a4f2 commit 66f95fe
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions pipelines.go
Expand Up @@ -268,8 +268,17 @@ func (s *PipelinesService) GetPipelineTestReport(pid interface{}, pipeline int,
//
// GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#create-a-new-pipeline
type CreatePipelineOptions struct {
Ref *string `url:"ref" json:"ref"`
Variables *[]*PipelineVariable `url:"variables,omitempty" json:"variables,omitempty"`
Ref *string `url:"ref" json:"ref"`
Variables *[]*PipelineVariableOptions `url:"variables,omitempty" json:"variables,omitempty"`
}

// PipelineVariable represents a pipeline variable.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html
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"`
}

// CreatePipeline creates a new project pipeline.
Expand Down

0 comments on commit 66f95fe

Please sign in to comment.