Skip to content
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

Add support for deployPercentage in store.publish API #89

Closed
jakub-g opened this issue May 16, 2024 · 4 comments · Fixed by #91
Closed

Add support for deployPercentage in store.publish API #89

jakub-g opened this issue May 16, 2024 · 4 comments · Fixed by #91

Comments

@jakub-g
Copy link

jakub-g commented May 16, 2024

The publish endpoint supports deployPercentage which could be useful for staged deploys.

image
@fregante
Copy link
Owner

PR welcome

@remdash
Copy link
Contributor

remdash commented Jun 5, 2024

Hello,

I am willing to make a PR for this change. I've already had a look a the code and the change looks straightforward.

There is just a design decision to make.

Most of the method to call the API have token being a last parameter and I assume this is something to keep in order to maintain consistency.

This leaves two options for the change to the publish method.

Either turning the first parameter to an object, it could look like this:

 async publish({ target = 'default', deployPercentage }, token = this.fetchToken()) {...}

Or adding a new parameter with a default value of null or undefined:

async publish(target = 'default', deployPercentage = null , token = this.fetchToken()) {...}

I can make a first version of the PR based on the first option, let me know if you prefer the second one.

@remdash
Copy link
Contributor

remdash commented Jun 5, 2024

Here is the PR: #91

@fregante
Copy link
Owner

fregante commented Jun 5, 2024

There's actually a PR open here with the answer to that in my review: #90

@fregante fregante linked a pull request Jun 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants