Skip to content

Commit

Permalink
Update pkg/azuredevops/pipelines/templatesParams.go
Browse files Browse the repository at this point in the history
Co-authored-by: Kacper Małachowski <[email protected]>
  • Loading branch information
Sawthis and KacperMalachowski authored Jul 5, 2024
1 parent a24f778 commit 4f70d68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/azuredevops/pipelines/templatesParams.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (p OCIImageBuilderTemplateParams) Validate() error {
if jobType, ok = p["JobType"]; !ok {
return ErrRequiredParamNotSet("JobType")
}
if jobType != "presubmit" && jobType != "postsubmit" && jobType != "workflow_dispatch" {
if !slices.Contains([]string{"presubmit", "postsubmit", "workflow_dispatch"}, jobType) {
return fmt.Errorf("JobType must be either presubmit, postsubmit or workflow_dispatch, got: %s", jobType)
}
if _, ok = p["PullBaseSHA"]; !ok {
Expand Down

0 comments on commit 4f70d68

Please sign in to comment.