godaddy-wordpress / sake

Our internal build tool for WP/WC plugins
MIT License
4 stars 0 forks source link

Add repo prefix and plugin slug setting #3

Closed ragulka closed 6 years ago

ragulka commented 6 years ago

It would be helpful to be able to configure the plugin slug that is used when looking up release issues on GitHub, as described on https://github.com/skyverge/wc-memberships-addons/issues/24#issuecomment-378396876

Since single-plugin repos do not need a plugin label on the issue, this only affects multi-plugin repos. The basic idea is to introduce 3 new settings:

An idea would be to not require the dash in the prefixes, but assume that a dash will always be needed to join the prefix and slug together.

@bekarice would love seeing your thoughts on this. The 3rd option kind of makes me think why do we even use the wcm- prefix on memberships addons repos? I guess for-teams alone sounds funny...

bekarice commented 6 years ago

@ragulka given it would be for one repo, i think we can just adjust our labels and deal with weirdness like for-teams, or just go with woocommerce- as the pluginPrefix and use memberships-for-teams as the plugin slug. Now that you've written this out, I don't think the releasePrefix is really necessary, we'll just structure that repo's labels more intelligently

ragulka commented 6 years ago

@bekarice I see that we're using wcm as the prefix for issues in https://github.com/skyverge/wc-memberships-addons/issues - if we want to support that, we'd need to introduce at least pluginPrefix and releasePrefix - the first to determine which part of the plugin id to strip out and the second to determine what to prefix it with.

Ie if the plugin id is woocommerce-memberships-for-teams, and the release issue label is wcm-for-teams, then: pluginPrefix = woocommerce-memberships releasePrefix = wcm

You could even call pluginPrefix as platformPrefix instead.

I'm not sure how we could do away with the pluginPrefix given that sake is used for multiple multi-plugin repos, and in wc-plugins, the prefix is woocommerce-. The only way I could see that happen is that we change labels on the addons repo, so they're similar to wc-plugins, ie memberships-for-teams, memberships-mailchimp-sync, in which case it would remove the need for the wcm prefix altogether.

bekarice commented 6 years ago

@ragulka I'm fine with updating the labels, this sounds like it might be more trouble than its worth. so if we were to update all labels to memberships-for-teams, etc., dropping the woocommerce- label, are any changes needed?

ragulka commented 6 years ago

if we were to update all labels to memberships-for-teams, etc., dropping the woocommerce- label, are any changes needed?

@bekarice I don't think so, it should just work out of the box, since this is the prefix expected on the wc-plugins repo.

bekarice commented 6 years ago

got it, we'll go with that 👍 updated labels in the add-ons repo