Generating a changelog
August 12, 2025 ยท View on GitHub
Use PyChangelog.
It's a Python tool that reads a github project event data through Github's API and generates a changelog with sections about fixed issues, and merged PRs.
Install
- Clone the repo :
git clone https://github.com/rero/pychangelog.git.
Usage
- Edit the following in
config.ini:repo: the name of the project (rero-ils,rero-ils-ui,sonar, ...)from_tagandto_tag: Title of latest release (e.g.v1.10.0) and title of next release (e.g.v1.11.0).
- Run
uv run poe changelog --token <your-github-token> - Check
PYCHANGELOG.mdfor your changelog - Copy the generated changelog from
PYCHANGELOG.mdto the top of your project'sCHANGELOG.md.
Verification
- After generating a changelog, check carefully that:
- Only the new release has been added to the
CHANGELOG.mdfile - The listed issues and PRs correspond to the ones that have been closed/merged for this release (not more, not less!)
- Only the new release has been added to the
- Manually fix any blatantly unclear or non-pertinent info in the generated
list. If necessary, edit the issue directly in Github and generate the
changelog again. Sometimes issues are closed without being fixed. If someone
closed an issue and forgot to tag it as
stale,wontfixorduplicate, the generator will add it to the changelog. - Once everything looks fine, save the file and keep on with the release!
GitHub's API Token
You need to generate a personal access token to avoid the API's limit. You can do that on https://github.com/settings/tokens.
You also need the correct permissions on the repository for which you want to read the events through the API.