Comments (9)
Hello, thanks for trying to use sv4git 😃
It's not exactly a bug because it's implemented to work like this, but in the future I would like to implement in a way that is possible to choose the sections in changelog and also join them in a section called misc.
Any ideas or feedback is more then welcomed!
from sv4git.
The problem right now is that release-notes.headers
is a map, so it is an unordered collection and I won't be able to get the sections order from it.
I need to check if go-yaml support any kind of ordered map or custom structure, but I found some open issues related to that.
One option would be add another attribute to sort it, but I think it would be error prone. It would be easy to add a new headers and forget to add it in the order array.
release-notes:
headers:
breaking-change: Breaking Changes
feat: Features
fix: Bug Fixes
order: [feat, fix, refactor, perf, test, build, ci, chore, docs, style,breaking-change]
Another option would be create a new attribute for sections and deprecate the headers
attribute. With this, would be possible to group commit types in a single section. Breaking changes is a special case because it has only messages and not commit types.
release-notes:
sections:
- name: Features
commit-types: [feat]
- name: Bug Fixes
commit-types: [fix]
- name: Misc
commit-types: [perf, docs]
- name: Breaking Changes
template: breaking-change
from sv4git.
Okay then I misunderstood something. But just to be clear: I don't want to reorder or change existing sections. I want to add an additional one targeting another commit type.
I know, but right now, the types for sections are hardcoded on the template, it would be easy to loop in the headers for each key/value but the order would be a problem..
Maybe I should just support the other types in a fixed order, and then do the refactor to support group and custom order..
Although I'd suggest consolidating template and commit-types into something like content, because in the end all sections are bullet lists, right?
no, breaking-change
is not a commit type. The sections with commit types has scope, commit hash and issues, but the section for breaking change has only a message. Right now there is 2 templates for sections (breaking change and commit), but the group probably would need another one, maybe to show the commit type..
from sv4git.
Wow thank you for already opening a PR regarding the functionality! 😝
Well I guess for the order you could take the order of values of the the versioning configuration? Then you would also handle user created types and still have the opt-behaviour through the headline configuration. Breaking changes could be at the top/bottom of each version notes. Grouping would then be another topic to handle. For this I think your second suggestion from above is the way to go.
In general, the second suggestion from above would be the superior one.
Anyways thank you again for directly addressing the feedback :)
from sv4git.
This feature is available in version 2.4.0!:rocket:
from sv4git.
Also running sv4git cl shows that the correct type is recognized:
user@supermachine01:~/projects/sv4git-test$ git sv cl -r hash -s 69c44c0
{"date":"2021-07-26","hash":"f0d9d6c","message":{"type":"chore","description":"Refine sv4git configuration"}}
{"date":"2021-07-26","hash":"1d3b726","message":{"type":"build","description":"add drone ci"}}
{"date":"2021-07-26","hash":"7b7dd31","message":{"type":"fix","description":"Fix heading"}}
{"date":"2021-07-26","hash":"a238066","message":{"type":"feat","description":"Add another line"}}
{"date":"2021-07-26","hash":"2068851","message":{"description":"Add build to headers"}}
{"date":"2021-07-04","hash":"247c5fa","message":{"type":"feat","description":"hm","isBreakingChange":true}}
{"date":"2021-07-04","hash":"480ab83","message":{"type":"feat","scope":"headline","description":"Introduced new headline"}}
{"date":"2021-07-04","hash":"885d53f","message":{"type":"build","description":"Add sv4git"}}
{"date":"2021-07-04","hash":"7c320f0","message":{"type":"docs","scope":"readme","description":"Fix linter error with title"}}
69... is the hash of the first commit
from sv4git.
Thanks for your response :)
Okay then I misunderstood something. But just to be clear: I don't want to reorder or change existing sections. I want to add an additional one targeting another commit type.
If the above case is also would you mean, I think the second option would be the way to go, as it is easier to understand and also easier to handle when upgrading versions (I guess?). Although I'd suggest consolidating template and commit-types into something like content, because in the end all sections are bullet lists, right?
from sv4git.
Well I guess for the order you could take the order of values of the the versioning configuration?
That's true, but could break retrocompatibility (current order in types is diferent from release note order).. but I think the second suggestion will be better in a long run..
from sv4git.
Thank you!
from sv4git.
Related Issues (19)
- Allow to release major version tag HOT 2
- git sv vcm seems not working with a rebase HOT 8
- Usage with an empty | null `commit-message.issue.key` HOT 2
- Default config can't be overridden on MacOS HOT 7
- Sometimes the changelog generated is very strange HOT 7
- Changelog generation should be able to generate last change untagged HOT 4
- Can't override branches.skip with an empty array HOT 1
- Executable installed with go install show "version source" with -v option HOT 7
- Provide Multi Architechure Releases
- Templating for changelog generation HOT 10
- [Feature Request] Allow regex to select part of commit message for conventional parsing HOT 3
- Running commands after install in Ubuntu results in an error. HOT 2
- Request: changelog from a commit/date ? HOT 4
- [Feature Request] Recognise Jira tickets in header HOT 1
- git-sv release-notes fails to find tag in pipeline HOT 5
- Closing parentheses appear in the wrong places HOT 10
- [Feature Request] Support environment variables in template HOT 1
- Publishing pre-releases HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sv4git.