Open MarcioMeier opened 3 months ago
I really see your point! Should we ignore all other commit messages that are not related to a PR then?
The concern of making this change is that the library will become tied to the github-flow.
With it, people that only commit in the branch, or use another way of merging branches will be impacted.
We could add this behaviour as parameter, so whoever is using it can decide on which pattern to generate the release notes.
You mean we could use a filter regex to define which commit messages would be used on the notes?
We could add a parameter to define the strategy for the release notes.
e.g.
import { nextTag } from 'monotag';
const nt = await nextTag({
repoDir: 'repos/myrepo',
toRef: 'HEAD',
path: 'modules/mymodule',
/**
/* the strategy to generate the release notes content
/* {'commit' | 'github-flow'} strategy
/* @default 'commit'
/**/
strategy: 'github-flow'
});
This strategy would generate release notes like the one I suggested in the issue description.
Problem being solved
Release notes quality.
This is the release notes generated for the
cdk-practical-constructs
library.It included all the commit messages and don't give a clear idea of what is being changed in the pull requests as it only logs the compare branch name. It also doesn't give a nice link to the pull requests, so I'd need to go through PR list and click on each one to have a better view of the changes...
Proposal
I see that many open source libraries uses the following pattern:
So the the given example from
cdk-practical-constructs
library would have the following release notes: