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

Support 'trim' option #435

Open
hazendaz opened this issue Aug 22, 2024 · 0 comments · May be fixed by #448
Open

Support 'trim' option #435

hazendaz opened this issue Aug 22, 2024 · 0 comments · May be fixed by #448

Comments

@hazendaz
Copy link
Contributor

I have a situation where getting the changelog can result in picking up commits with trailing spaces from git history. I have automated processes I've integrated into using this plugin now to generate the full changelog upon maven release plugin usage. I further have auto formatting on separately but not during a release post profile like that. What happens is that due to automation, it will auto format the markdown file after release has completed causing another release to occur and endless loop. I've mitigated from the issue for now but most appropriate fix is to take a new attribute here that potentially would be called 'whitespaceTrim' that is false by default. The logic to trim is rather simple and would be something I'd like to contribute.

While one might say write your pom differently to avoid this, the thing is a super pom is involved here with over 2k repos that do not all have auto formatting and lots of profiles are involved. So the mitigation does a look back 2 commits to make sure release didn't just happen before format to avoid the condition. The file created here could further just be globally excluded from trimming but there are half a dozen plugins involved with formatting making that not quite simple. Having ability to do this light cleanup of unnecessary data from changelog seems appropriate here as it doesn't affect the results. The default to 'false' therefore would simply be to keep plugin as is unless opted into the cleanup.

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 a pull request may close this issue.

1 participant