diff --git a/README.md b/README.md index 2a4f3ac9c..e27e1171e 100644 --- a/README.md +++ b/README.md @@ -2448,8 +2448,7 @@ params.ProjectKey = "project" params.Async = true environment := "target-env" -overwrite:=true -resp, err := serviceManager.PromoteReleaseBundle(rbDetails, params, environment, overwrite) +resp, err := serviceManager.PromoteReleaseBundle(rbDetails, params, environment) ``` #### Get Release Bundle Creation Status diff --git a/lifecycle/manager.go b/lifecycle/manager.go index e08ea15cc..e5c2a3dc2 100644 --- a/lifecycle/manager.go +++ b/lifecycle/manager.go @@ -48,9 +48,9 @@ func (lcs *LifecycleServicesManager) CreateReleaseBundleFromBundles(rbDetails li return rbService.CreateFromBundles(rbDetails, params, sourceReleaseBundles) } -func (lcs *LifecycleServicesManager) PromoteReleaseBundle(rbDetails lifecycle.ReleaseBundleDetails, params lifecycle.CreateOrPromoteReleaseBundleParams, environment string, overwrite bool) (lifecycle.RbPromotionResp, error) { +func (lcs *LifecycleServicesManager) PromoteReleaseBundle(rbDetails lifecycle.ReleaseBundleDetails, params lifecycle.CreateOrPromoteReleaseBundleParams, environment string) (lifecycle.RbPromotionResp, error) { rbService := lifecycle.NewReleaseBundlesService(lcs.config.GetServiceDetails(), lcs.client) - return rbService.Promote(rbDetails, params, environment, overwrite) + return rbService.Promote(rbDetails, params, environment) } func (lcs *LifecycleServicesManager) GetReleaseBundleCreationStatus(rbDetails lifecycle.ReleaseBundleDetails, projectKey string, sync bool) (lifecycle.ReleaseBundleStatusResponse, error) { diff --git a/lifecycle/services/promote.go b/lifecycle/services/promote.go index 7d767c5a7..5a7489210 100644 --- a/lifecycle/services/promote.go +++ b/lifecycle/services/promote.go @@ -33,11 +33,10 @@ func (p *promoteOperation) getOperationParams() CreateOrPromoteReleaseBundlePara return p.params } -func (rbs *ReleaseBundlesService) Promote(rbDetails ReleaseBundleDetails, params CreateOrPromoteReleaseBundleParams, environment string, overwrite bool) (RbPromotionResp, error) { +func (rbs *ReleaseBundlesService) Promote(rbDetails ReleaseBundleDetails, params CreateOrPromoteReleaseBundleParams, environment string) (RbPromotionResp, error) { operation := promoteOperation{ reqBody: RbPromotionBody{ Environment: environment, - Overwrite: overwrite, }, rbDetails: rbDetails, params: params, @@ -53,7 +52,6 @@ func (rbs *ReleaseBundlesService) Promote(rbDetails ReleaseBundleDetails, params type RbPromotionBody struct { Environment string `json:"environment,omitempty"` - Overwrite bool `json:"overwrite_existing_artifacts,omitempty"` IncludedRepositoryKeys []string `json:"included_repository_keys,omitempty"` ExcludedRepositoryKeys []string `json:"excluded_repository_keys,omitempty"` }