chloggen Workflow
This repo uses chloggen to generate CHANGELOG.md from per-PR YAML entries in .chloggen/. Every user-facing PR needs one entry.
Commands
make chlog-new— create a template entry named after the current branch, auto-fillingissues:andchange_typeif a PR already exists.make chlog-validate— validate all pending entries. Fails if any entry has emptyissues:.make chlog-preview— dry-run the CHANGELOG update.make chlog-update— consume entries and write to CHANGELOG.md (release only).
Change types allowed here: feature, bug_fix, docs. The wrapper in scripts/chloggen-wrapper.sh translates these to chloggen's built-ins — don't hand-edit it.
Preferred workflow (draft PR first)
make chlog-new reads the PR for the current branch to prefill issues: and infer change_type from the PR title's conventional-commit prefix (feat → feature, fix → bug_fix, docs → docs). To use that, create the PR as a draft first so nothing publishes before the entry lands.
- Make code changes on your branch, commit, push.
gh pr create --draft --title "feat: ..." --body "..."make chlog-new— writes.chloggen/<branch>.yamlwithissues: [N]andchange_typeprefilled.- Edit the file: fill in
note:(one-line description). Addsubtext:only if extra detail is warranted. make chlog-validate— should pass now.- Commit the entry, push.
gh pr ready <PR>— promote out of draft.
If you already opened a non-draft PR
make chlog-new still works; run it and it will fill in the PR number. Or hand-edit the template and set issues: [N] yourself. Commit as a follow-up.
Gotchas
chlog-validateerrors withspecify one or more issues #'swhenissues:is empty — that means no PR existed whenmake chlog-newran. Fill it in and re-run.- Entry filename is
<branch-name>.yaml(slashes replaced with underscores). Don't rename it. .chloggen/TEMPLATE.yamland.chloggen/config.yamlare not entries; the wrapper skips them.