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

[Eurostep] Adapt widget-builder to multi channel (MSF) #110

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

eurostep-commerce
Copy link

What? Why?

The PR wants to allow the developer to publish the widget-template to a channel different from the default channel.
Starting from the automatically created environment variable in the widget folder WIDGET_BUILDER_CHANNEL_ID, the developer can add in his local a list of channels (comma separated) where he wants to publish the template, ex:
WIDGET_BUILDER_CHANNEL_ID=1,2

The change in the library removes the hardcoding to the default channel, and runs the publish for each channel inserted in the .env variable.
We preferred to manage it from the .env variable instead of using options since it's common to publish and update the widgets to every available channels during the project (so the dev shouldn't have to add options like --c=1,2 for every push, but instead change the the .env when he needs to do something different from the daily routine).

For any doubts about the implementation please send an email to:

Testing / Proof

The PR doesn't include implementations in the test files, ofc it is tested and working on Eurostep Commerce stores.
TBAdded: there is no check if the channel exists on the publish, if a channel doesn't exist the dev will receive a successful message even if nothing was published (since the channel id is not existent)

From the .env file of the widget-workshop folder in the template folder retrieve the list of ids to be split in list of publishese
Based on the channel id passed, publish the template in the specific channel id
bc-jcha
bc-jcha previously approved these changes Oct 28, 2022
@bc-0dp
Copy link

bc-0dp commented Oct 31, 2022

@christensenep can you merge this?

bc-0dp added a commit to bc-0dp/widget-builder that referenced this pull request Oct 31, 2022
@bc-0dp
Copy link

bc-0dp commented Oct 31, 2022

#111 supports this PR

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.

4 participants