发布

  • feat(changelog): order by PEP 440 and drop --generate-notes (#1841)

    frostbyte_neo 发布于 2026-07-02 08:03:21 +00:00

    Two fixes surfaced from a v0.4.0dev0 tag push:

    1. github-release.yml failed with HTTP 422 "body is too long (maximum is
      125000 characters)": --generate-notes asked GitHub to list every PR since
      the previous tag (193 for the v0.3.0→HEAD range), overflowing the release-
      body cap. We draft our own curated notes in draft-release-notes.yml, so
      --generate-notes is dead weight. Replace it with a short placeholder body
      that draft-release-notes.yml overwrites; the 422 failure mode is gone.

    2. A manual run for a dev tag (v0.4.0dev0 --base v0.3.0) harvested 6 PRs but
      reported "CHANGELOG.md already up to date" — generate.py gated the write on
      a strict ^v\d+.\d+.\d+$ regex that a .dev0 tag fails, so it silently
      skipped the write. Order CHANGELOG.md by PEP 440 (packaging.Version) using
      the full tag string as the block header, so dev/rc tags land in their own
      correctly-ordered blocks (v0.4.0 > v0.4.0rc1 > v0.4.0.dev0 > v0.3.0) and
      coexist with the eventual final rather than collapsing into it. Re-running a
      tag still replaces its own block (idempotent).

    previous_final_tag stays finals-only (a real v0.4.0 still diffs against v0.3.0,
    not an intervening rc). The workflow_run auto-trigger is unchanged and remains
    finals-only — dev/rc changelog blocks are reachable only by manual dispatch.
    The harvest step installs packaging (it runs bare python3 before uv sync), and
    the dry_run input description is trimmed.

    87 tests pass; verified end-to-end that v0.4.0dev0 --base v0.3.0 now writes a
    correctly-ordered block instead of no-op'ing.

    Co-authored-by: Isaac

    下载附件