CircleCI-Public / orb-tools-orb

Various tools for authoring and publishing CircleCI orbs
https://circleci.com/orbs/registry/orb/circleci/orb-tools
MIT License
51 stars 75 forks source link

#77 - Default value for semver #109

Closed bmbferreira closed 3 years ago

bmbferreira commented 3 years ago

Adds new parameter to set a default value when the commit does not contain [semver:] on the subject.

Checklist

Motivation, issues

In my team we are always forgetting to add the semver on the commit subject and this forces us to do a new commit just to bump it. I would prefer to fallback to patch if someone forget to add it. It seems that this is also requested by other people as well, as we can see in #77.

Description

Adds a new parameter to set a default increment to be used if the commit subject does not contain the required expression [semver:(patch|minor|major|skip)] to increment the version.

KyleTryon commented 3 years ago

I would prefer to fallback to patch if someone forget to add it.

This would result in potentially breaking changes for users of the orb. The design is such that it is on the user merging to specify the update type, otherwise, fail (ensuring the issue is addressed). This may be acceptable for personal use, but would not be adequate for orbs used by many users/teams.

KyleTryon commented 3 years ago

Just having a thought, perhaps we could satisfy all needs by also including a new default of "fail". Any thoughts?

bmbferreira commented 3 years ago

Hi @KyleTryon

This would result in potentially breaking changes for users of the orb.

I don't consider this a breaking change since I'm just adding a parameterized fallback value to assume if the user forgets to put the semver thingy on the commit subject. If they don't specify the parameter, it will just have the same behaviour that it had before.

Just having a thought, perhaps we could satisfy all needs by also including a new default of "fail". Any thoughts?

😕 what's the difference comparing to what I just did?

gmemstr commented 3 years ago

@KyleTryon I think this PR is worthwhile, and I believe, from reviewing the code, it should have the same behaviour that currently exists, as @bmbferreira points out. I won't reopen the PR on your behalf but it may be worth reconsidering :)

KyleTryon commented 3 years ago

@gmemstr @bmbferreira Would love to talk more on this, I have added my comments to the issue here: https://github.com/CircleCI-Public/orb-tools-orb/issues/77#issuecomment-779952494

We will not consider anything here complete or final until the issue is closed and we are all happy 👍

gmemstr commented 3 years ago

Closing this as we're looking at other way of approaching orb versioning.