Two changes that together eliminate changelog merge conflicts from concurrent PRs: 1. **CHANGELOG.md is regenerated only by release.py.** The previous cut still had every changelog.py invocation rewrite CHANGELOG.md with a different [Unreleased] block, so two PRs producing different unreleased content collided on the MD file. Checked-in CHANGELOG.md now contains released versions only. Unreleased is rendered on demand from changelog.d/ via scripts/preview-changelog.py — prints to stdout, writes nothing. 2. **Fragment format: Markdown instead of TOML.** Filenames now look like `<type>-<slug>-<hex4>.md` (e.g. `fixed-dev-version-mismatch-a1b2.md`). Type is readable at-a-glance in the directory listing; 4-char random hex prevents collision when two PRs pick the same slug. Body is plain Markdown with `## English` / `## Русский` sections — renders directly on GitHub, no YAML/TOML parser dependency. - scripts/changelog_lib.py: MD parser replaces tomllib. render_full_md drops the [Unreleased] block; write_md(data) signature simplified; render_unreleased_md(fragments) for on-demand preview. - scripts/changelog.py: writes <type>-<slug>-<hex4>.md, no MD regen. - scripts/release.py: updated to the new write_md signature. - scripts/preview-changelog.py: new. - changelog.d/*.md: 10 existing TOML fragments migrated to MD. One fragment (changelog-entries-now-live-as-per) updated to say Markdown instead of TOML since that's the final state by the time this ships. - CHANGELOG.md: regenerated — Unreleased block gone. - .gitattributes: merge=union moved from *.toml to *.md. - docs/changelog.md, docs/releasing.md, CONTRIBUTING.md, changelog.d/README.md, CLAUDE.md: describe the new format + flow.
1.9 KiB
Unreleased changelog fragments
Each .md file here is a single entry that will land in the next
release. ./scripts/release.py rotates all fragments into history[0]
of lsposed/app/src/main/assets/changelog.json and deletes the files.
Adding an entry
./scripts/changelog.py <type> "<EN text>" "<RU text>"
Types: added, changed, fixed, removed, deprecated, security.
This writes a single file changelog.d/<type>-<slug>-<hex4>.md. That's
the only file modified — CHANGELOG.md is regenerated only at release
time, so two concurrent PRs can't collide on it. The 4-char hex suffix
is random; two teammates picking the same slug still produce different
filenames.
Commit the new fragment alongside your code change. To preview the
pending (fragments-only) changelog, run ./scripts/preview-changelog.py.
Fragment file format
Filename: <type>-<slug>-<hex4>.md — the type is part of the name so
you can tell what kind of change a fragment is at a glance in the
directory listing.
Body: a date line on top, then two language sections. Renders directly on GitHub — no TOML, no YAML frontmatter, no parser dependency.
_2026-04-19_
## English
App no longer crashes when ...
## Русский
Приложение больше не падает когда ...
The date is in YYYY-MM-DD format, wrapped in _…_ so GitHub renders
it as a subtle italic line. changelog.py writes today's date
automatically; when editing by hand, keep the format literal so the
parser recognises it.
Leading/trailing whitespace inside each language section is stripped when loaded. Fragments are sorted chronologically by that date when the Unreleased preview is rendered; ties fall back to filename order.
Prefer the changelog.py script for creating fragments; editing by
hand works but you need to match the filename pattern and section
headings exactly.