-
Notifications
You must be signed in to change notification settings - Fork 45
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
feat: Add merge-method option #105
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for the contribution! This looks great.
One small request: let's add some validation within the command to error if any invalid string value is passed (i.e. only allow "merge", "squash", and "rebase"). This way it will fail immediately at the start rather than doing a fan out and failing for all the parallelized commands.
Something like the "custom validator" logic shown here:
https://github.com/spf13/cobra/blob/master/user_guide.md#positional-and-custom-arguments
Hi @nathanleiby, AFAIK, custom validation applies for the whole command ( I see four options.
|
@cobraz thanks for digging into this. Elsewhere in the repo we've followed an approach I think is (2) or (3) in your list. Here's an example of validating that the string passed to |
@cobraz I realized I didn't link the suggested code with validation logic. I'm sorry about that! The code I meant to link is here: Lines 36 to 47 in bc56dbb
Hope this isn't stepping on your toes too much, but I went ahead and implemented the same sort of check for |
Released here: https://github.com/Clever/microplane/releases/tag/v0.0.33 |
Thank you 🙏 |
As per #103, this adds the option to set which merge method to use (e.g. squash or rebase).
fixes #103