-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Allow replacing part of changelogs or commit message using replace_command #611
Comments
The inconsistent behaviour in TextProcessor.run:228 makes coming up with a non-breaking and clean solution difficult. Thus I think we need to decide whether we are willing to do a breaking change. If we are, we could change The switch between the old and new behaviour could be reintroduced by having an alternative |
Let's not make a breaking change with this one. Can you share some config snippets / usage examples about how the new |
definitely interested in this functionality as I would like to be able to switch out the repo url dynamically from our build system and would rather not have to call another script post changelog generation. I understand the desire to not to introduce a breaking change but surely that's the point of semver. Alternatively adding an additional parameter, or a different And obv supporting env var / shell commands as |
I've done some more thinking on this since opening the issue, and I strongly believe that a breaking change would be the best cause of action. The inconsistent behaviour of The current behaviour of |
@orhun, could you chime in on this? If a breaking changes is permissible, I'd give implementing it a shot. |
I gave this another thought and I guess making a breaking change is tolerable for the sake of having a more consistent functionality. @Cyclonit sure, go ahead! |
Is there an existing issue or pull request for this?
Feature description
Currently the behaviour of
replace
andreplace_command
are inconsistent.replace
will replace all matches ofpattern
with a given string, whereasreplace_command
replaces the entire string as long as at least one match was found.See TextProcessor.run:228 for references.
For example, the following
changelog.postprocessor
will replace the entire changelog instead of only the matched occurrences of<REPO>
.Desired solution
This issue is intended to serve as a place to discuss possible solutions.
Alternatives considered
None
Additional context
No response
The text was updated successfully, but these errors were encountered: