-
Notifications
You must be signed in to change notification settings - Fork 36
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
Feature Request: Enhanced Changelog Format Options #608
Comments
I believe the first one is already possible by using components. I can make an example for you later if needed. And the latter might be possible by adding the component to the change format and skipping the component format. Again, I can try it tomorrow. |
ah i did try to play with
But it was prepended to the project specific CHANGELOG. It will be awesome if you can provide an example |
Right, components are configured per project if you are using both. However during the merge process we still generate separate changelogs. If you only want to build one changelog you would not use projects, maybe you would use components instead. I'm not sure I fully understand what you want the final output to be as what I was going to suggest is what you tried. It sounds like you are using a monorepo, but want a single changelog where components determine which app or system the change took place in. Which is possible using components, without projects. If the apps are independently released and thus have separate changelogs, you can use the projects feature to handle that. But you will get one changelog per project. There is not a way to create one changelog while using projects as the whole point of that config is to generate multiple changelogs. |
ah I see what you mean, sorry it was a bit confusing. Is it possible to have projects and components coexist, when only one projects requires components during ie. only project
|
Currently no, projects keep the same global options as all the others. I was on the fence about adding options to the projects configuration as it would definitely greatly expand the complexity of the config. As it is, practically every option in the global config level would be applicable to at the projects level and I wasn't really prepared for that. |
oh okay. what was the reason it was not implemented and could this be a feature request? |
I was unsure if this kind of functionality was going to be useful or not, and I saw how complicated the kind configs got with custom prompts per kind and wasn't sure how much that was to explode the complexity when I started doing the same idea in the project config. Its quite possible that between projects and some of the formatting I may just need to readjust the config from the ground up. For me, it wouldn't make sense to just add the one config you need and skip all the other parts that would also apply to projects. But yea, doing all of that would be a lot of work. |
maybe a bug or user error, when changie is set up something like this
|
Ok I think I reproduced the issue, without a Component header it does look funky. componentFormat: '### {{.Component}}'
kindFormat: '* {{.Kind}}' My steps look like this: changie new -c UI -k Added -b "placeholder" -m Issue=5
changie new -c UI -k Changed -b "placeholder" -m Issue=5
changie new -c UI -k Removed -b "placeholder" -m Issue=5
changie new -c Backend -k Added -b "placeholder" -m Issue=5
changie new -c Backend -k Removed -b "placeholder" -m Issue=5
changie batch auto
cat ./.changes/$(changie latest).md Output:
With this config: kindFormat: '### {{.Kind}}'
changeFormat: '* {{.Component}} {{.Body}}' It gives the, not quite correct output of:
That is, it still groups components first, and then kind. Ideally it would group both UI and backend components under the added/removed kinds since we don't want the component headers. |
Ideally we would like the change log to be formatted in this way, is there any work around to not output duplicated Also, I did for forgot to mention we will have multiple unique entry for the same components, thanks for acknowledge this |
Its not that the kinds is being duplicated, its that its trying to output one component at a time, its just that the component format is empty so there is no output for it. The solution here would be to skip sorting/grouping by component if the component format is empty, or some config flag, that way the default kind sorting would include multiple components worth of changes. That is this block here Lines 49 to 58 in 3e31b28
If instead of checking if components is enabled by Edit: Modified the code locally and re-ran the repro steps. ## v7.0.0 - 2024-03-02
### Added
* UI placeholder
* Backend placeholder
### Changed
* UI placeholder
### Removed
* UI placeholder
* Backend placeholder That is what you are looking for right? Edit 2: One more point above is that I actually think we should still consider sorting by component in this scenario, but after kind, such that the component updates are grouped together in the kind update. Right now its sorted by time in my test script. |
Ok, so to summarize.
I can make a separate ticket for 2 with a more specific summary and get to that soon. But want to clarify the first one is good to go or answer any questions on that one. |
Just one more request... when the changie config set to components only, can we have an option to also export changelog individually, maybe an optional config like this?
|
oops forgot to reply, if you need more then one changelog you have to use the projects feature. You could swap components for projects and get that. Components do not have that options and I don't see why I would add them now that we have the projects system. |
Is your feature request related to a problem? Please describe.
not really
Describe the solution you'd like
Currently, Changie supports a standard changelog format, but I'm interested in having additional formatting options to cater to different project structures (monorepo). Specifically, I propose two new formats:
Plugin/Module-Centric Format:
or
Category-Centric Format with Module Reference:
Describe alternatives you've considered
Each project have their own changelog, run
changie batch
as normal, but replacechangie merge
with a custom scriptAdditional context
Closed the other two ticket since they are no longer applicable.
The text was updated successfully, but these errors were encountered: