Skip to content

Commit

Permalink
fix: scan branch failed when source type is gitsource (#1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
yudong2015 authored Nov 16, 2023
1 parent 82297c6 commit d6a9f6e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/kapis/devops/v1alpha3/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ func (h *devopsHandler) CreatePipeline(request *restful.Request, response *restf
return
}

// fix: scan branch failed when source type is gitsource
if pipeline.IsMultiBranch() && pipeline.Spec.MultiBranchPipeline.GitSource != nil {
pipeline.Spec.MultiBranchPipeline.GitSource.DiscoverBranches = true
pipeline.Spec.MultiBranchPipeline.GitSource.DiscoverTags = true
}

if client, err := h.getDevOps(request); err == nil {
created, err := client.CreatePipelineObj(devops, &pipeline)
errorHandle(request, response, created, err)
Expand Down

0 comments on commit d6a9f6e

Please sign in to comment.