Skip to content

fix: merge deploy api options #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 23, 2021
Merged

fix: merge deploy api options #272

merged 1 commit into from
Mar 23, 2021

Conversation

shetzel
Copy link
Contributor

@shetzel shetzel commented Mar 23, 2021

What does this PR do?

This will merge deploy api options with the defaults rather than using them only when undefined

What issues does this PR fix or reference?

@W-8942811@

Functionality Before

If partial api options were defined during the deploy, it would use those and not apply the defaults which would cause problems. If no api options were defined it would use the defaults.

Functionality After

If partial api options are defined during the deploy, it merges the defaults. This allows the defaults to be used when some options are specified and some are not.

this will merge deploy api options with the defaults rather than using them only when undefined
@shetzel shetzel requested a review from a team as a code owner March 23, 2021 00:00
@@ -189,7 +189,8 @@ export class MetadataApiDeploy extends MetadataTransfer<MetadataApiDeployStatus,

constructor(options: MetadataApiDeployOptions) {
super(options);
this.options = Object.assign({}, MetadataApiDeploy.DEFAULT_OPTIONS, options);
options.apiOptions = { ...MetadataApiDeploy.DEFAULT_OPTIONS.apiOptions, ...options.apiOptions };
this.options = Object.assign({}, options);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple ways to do this, and maybe it becomes MetadataApiDeploy.DEFAULT_API_OPTIONS but that was a more disruptive change so thought I'd start with this.

@shetzel shetzel merged commit 162d7cd into develop Mar 23, 2021
@shetzel shetzel deleted the sh/apiOptions-merge branch March 23, 2021 16:13
sfsholden pushed a commit that referenced this pull request Mar 30, 2021
this will merge deploy api options with the defaults rather than using them only when undefined
sfsholden pushed a commit that referenced this pull request Mar 30, 2021
this will merge deploy api options with the defaults rather than using them only when undefined
sfsholden pushed a commit that referenced this pull request May 6, 2021
this will merge deploy api options with the defaults rather than using them only when undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants