Replace git-cliff with Release-Notes.md changelog generation #22

Closed
opened 2026-07-07 20:59:35 +00:00 by coding-agent-marvin8 · 1 comment
coding-agent-marvin8 commented 2026-07-07 20:59:35 +00:00 (Migrated from codeberg.org)

Longwei's just release recipe currently uses git-cliff to generate changelog entries from commit messages. This issue tracks replacing that with a simpler approach based on the bullet points already written in Release-Notes.md, following the same change made in zaojun.

Scope:

  • Rewrite the release recipe in justfile to extract bullet points from Release-Notes.md's intro post using awk, and append a flat ungrouped list of commits since the last tag (each linked to the commit on Codeberg)
  • Remove git-cliff~=2.12 from [dependency-groups] dev in pyproject.toml
  • Remove the [[tool.zaojun.license-ignore]] entry for git-cliff
  • Delete cliff.toml
  • Regenerate uv.lock and pylock.toml
Longwei's `just release` recipe currently uses git-cliff to generate changelog entries from commit messages. This issue tracks replacing that with a simpler approach based on the bullet points already written in `Release-Notes.md`, following the same change made in zaojun. Scope: - Rewrite the `release` recipe in `justfile` to extract bullet points from `Release-Notes.md`'s intro post using `awk`, and append a flat ungrouped list of commits since the last tag (each linked to the commit on Codeberg) - Remove `git-cliff~=2.12` from `[dependency-groups] dev` in `pyproject.toml` - Remove the `[[tool.zaojun.license-ignore]]` entry for `git-cliff` - Delete `cliff.toml` - Regenerate `uv.lock` and `pylock.toml`
coding-agent-marvin8 commented 2026-07-07 21:00:35 +00:00 (Migrated from codeberg.org)

Findings:

Current justfile release recipe calls uv run git-cliff --tag "$NEXT" --unreleased --prepend CHANGELOG.md.

zaojun replacement approach:

BULLETS=$(awk '/^longwei /{found=1; next} found && /^#/{exit} found && /^-/{print}' Release-Notes.md)
DATE=$(date +%Y-%m-%d)
LAST_TAG=$(git describe --tags --abbrev=0)
COMMITS=$(git log "${LAST_TAG}..HEAD" --pretty=format:'- %s [`%h`](https://codeberg.org/MarvinsMastodonTools/longwei/commit/%H)')
{ printf "## [%s] - %s\n\n%s\n\n### Commits\n\n%s\n\n" "$NEXT" "$DATE" "$BULLETS" "$COMMITS"; cat CHANGELOG.md; } > /tmp/cl_tmp && mv /tmp/cl_tmp CHANGELOG.md

Dependencies to remove:

  • "git-cliff~=2.12" from [dependency-groups] dev
  • [[tool.zaojun.license-ignore]] entry for git-cliff
  • cliff.toml file

uv.lock and pylock.toml must be regenerated after removing the dep (pre-commit uv-export hook is present).

Plan:

  1. Rewrite release recipe in justfile using the awk-based approach.
  2. Remove git-cliff from pyproject.toml dev deps and remove its license-ignore entry.
  3. Run uv sync to update lockfiles; run uv export --format pylock.toml -o pylock.toml --quiet.
  4. Delete cliff.toml.
  5. Stage all changed files in one commit.
**Findings:** Current `justfile` release recipe calls `uv run git-cliff --tag "$NEXT" --unreleased --prepend CHANGELOG.md`. zaojun replacement approach: ```bash BULLETS=$(awk '/^longwei /{found=1; next} found && /^#/{exit} found && /^-/{print}' Release-Notes.md) DATE=$(date +%Y-%m-%d) LAST_TAG=$(git describe --tags --abbrev=0) COMMITS=$(git log "${LAST_TAG}..HEAD" --pretty=format:'- %s [`%h`](https://codeberg.org/MarvinsMastodonTools/longwei/commit/%H)') { printf "## [%s] - %s\n\n%s\n\n### Commits\n\n%s\n\n" "$NEXT" "$DATE" "$BULLETS" "$COMMITS"; cat CHANGELOG.md; } > /tmp/cl_tmp && mv /tmp/cl_tmp CHANGELOG.md ``` Dependencies to remove: - `"git-cliff~=2.12"` from `[dependency-groups] dev` - `[[tool.zaojun.license-ignore]]` entry for `git-cliff` - `cliff.toml` file `uv.lock` and `pylock.toml` must be regenerated after removing the dep (pre-commit `uv-export` hook is present). **Plan:** 1. Rewrite `release` recipe in `justfile` using the awk-based approach. 2. Remove `git-cliff` from `pyproject.toml` dev deps and remove its license-ignore entry. 3. Run `uv sync` to update lockfiles; run `uv export --format pylock.toml -o pylock.toml --quiet`. 4. Delete `cliff.toml`. 5. Stage all changed files in one commit.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
marvin8/longwei#22
No description provided.