-
Notifications
You must be signed in to change notification settings - Fork 371
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
Find a better tool for CHANGELOG.md generation #2682
Comments
I think I would still prefer some other existing tool with customization |
Hey, if this is still a pending issue, I would love to try it out! |
@AlekSi I found this tool called git-chglog, which is written in Golang. We have an option of either running it as a Docker container, or using it as a direct dependency. Once a template and workflow is defined, running this is simply: git-chglog -o CHANGELOG.md By integrating this into the |
It does not look like git-chglog uses PRs. |
I think they use merge commit subject lines, not PR titles. The difference is that PR's title and labels can be edited after that PR is merged. We often do that to produce better changelog entries. |
@AlekSi Understood what you meant by that. Can I clarify that in essence we need some tool that does the following:
Unfortunately, there are not many out of the box solutions sufficiently allow this type of workflow, since the idea of Pull Requests are mainly relevant to only GitHub. However, majority of the solutions focus on commits specifically since it is an intrinsic part of Git itself, shared across Git-based version control platforms. I tried the workflow above for steps 1 and 2 which are fairly easy. The latest tag and date of tag can be obtained with a git command, which can be executed using Google's GitHub wrapper or with the go-git. Subsequently, using a variant of the cURL command curl -H "Accept: application/vnd.github+json" \
"https://api.github.com/search/issues?q=repo:FerretDB/FerretDB+is:pr+is:merged+merged:>=2023-08-28" we can get all PRs. The great thing is the PR response from the Git endpoint has both the title of the PR and the label. Subsequently, some data processing can be done to filter and group the PRs by some input labels, and finally render the new version and merge the existing CHANGELOG based on the template. Of course, this isn't very trivial to do, but I believe that this could yield good results. |
Merging with existing CHANGELOG (and some minor tweaks) could be done manually. The new version's changelog could be rendered to the stdout. We would much prefer not to maintain one more tool ourselves. We might make our own, but only if no one exists already. |
Got it. That would be doable as well! |
What should be done?
Currently, we use GitHub's built-in changelog generator: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
We want to replace it with something that could be run locally to simplify our release process.
One good feature of the current tool is that it uses PR titles, not commits. The new tool should have that feature too.
Another feature we want to have is some customization with templates.
Once the tool is found, we should add it as a dependency (via tools.go or as a Docker image) and make it available via
task changelog
.Where?
Takfile.yml
Definition of Done
task changelog
works.The text was updated successfully, but these errors were encountered: