-
Notifications
You must be signed in to change notification settings - Fork 3
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
Why is there no support for multiple templates? #4
Comments
I knew someone would ask 😃 I originally wanted this to be more of a DIY solution where you have the info and you can arrange it as you desire and do whatever with the output. I would add multiple templates but there is so much info and so many ways to create changelogs and everyone wants it to be a certain way. so I only have one (opinionated) template by default and export all the info (sorted and unsorted) for people to create their own. for example, in the default template, I put a link to the commit with the short hash. some like to have the link on the commit text, some like to put it on the end, some only like to put the hash but not a link, some people would prefer not to have it altogether. this would either require me to add every requested template, or create a templating language which is dynamic enough. I'd rather that language be javascript/typescript than creating my own. |
Mh I see, but for example: |
if you just want a list of commits, you can do something like: // ghlog@0.2.x
const { _meta } = await getChangeLog("owner/repo");
const changelog = `CHANGELOG
${ _meta.commits.all.map(({ message }) => `- ${message}` ).join("\n") }
`
// write `changelog` to file I'm trying to think of a good way for how to structure the output of |
Mh I see okay, I was just doing it badly! |
I think that you should make multiple differents templates, ones with categories, ones without, one without emojis, etc, and let us select it through the CLI (with a
--template
argument for example).This would greatly improve this project!
The text was updated successfully, but these errors were encountered: