Skip to content

Render real release notes instead of preview text on tag builds - #51

Open
piotrekno1 wants to merge 3 commits into
develfrom
fix/changelog-notes-heading
Open

piotrekno1 wants to merge 3 commits into
develfrom
fix/changelog-notes-heading

Conversation

@piotrekno1

Copy link
Copy Markdown
Collaborator

Follow-up to the 0.2.1 release, where the published v0.2.1 notes came out headed "Changelog preview for v0.2.1" above a blockquote promising notes that would be generated "when this is tagged" — on the tag's own release.

Cause

release.yml and release-pr.yml share scripts/build_changelog_comment.py, but the script only ever emitted the PR wording. It is not a regression: the string is byte-identical at v0.2.0.

$ git show v0.2.0:scripts/build_changelog_comment.py
        f"## Changelog preview for `{tag_name}`\n\n"
        "> Preview of the release notes that will be generated when this is tagged.\n\n"

The v0.2.0 and v0.1.5 releases read "Changelog for vX" because their bodies were hand-edited after publishing. The generator was never fixed, so every tag build has quietly required that cleanup.

Fix

release.yml sets TAG_NAME from github.ref_name; release-pr.yml never sets it. That difference already distinguishes the two callers, so main() derives preview = not TAG_NAME and build_comment() takes it as a keyword-only argument. No workflow change needed.

Verified against both real invocations on a clean clone, on Python 3.10 (which also re-confirms the tomllib removal shipped in 0.2.1):

### tag build (TAG_NAME set)     -> ## Changelog for `v0.2.1`          (no blockquote)
### PR build   (no TAG_NAME)     -> ## Changelog preview for `v0.2.1`  (blockquote kept)

Tests

First tests for this script: both wordings, the first-release range fallback, the empty-commit-range case, the release-commit filter, and that get_version() works without tomllib.

601 passed, 36 skipped; ruff check clean.

Note, not fixed here

RELEASE_COMMIT_RE only matches ^Release \d+\.\d+\.\d+$, so the subjects used by earlier releases — Bump version to 0.1.5, 0.1.4 release bump — slip through into the notes. Harmless while release commits keep the current Release X.Y.Z form; worth tightening only if that convention drifts again.

This PR also carries the 0.2.1 release commit back to devel, which was otherwise still behind main.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TVrfA4Xy9wWmifB9JZc8Es

piotrekno1 and others added 3 commits September 1, 2026 10:17
Fix two stale bits in the release artifact path found while verifying:
llms.txt carried the retired on-device-only tagline, and
build_changelog_comment.py still imported tomllib, which breaks the
release-PR preview on any runner whose default python3 is 3.10.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TVrfA4Xy9wWmifB9JZc8Es
release.yml and release-pr.yml share build_changelog_comment.py, but the
script only ever emitted the PR wording, so every tag build published notes
headed "Changelog preview for vX" over a blockquote promising notes that
would be generated "when this is tagged" — on the tag's own release. Past
releases were hand-edited afterwards; the generator was never fixed.

release.yml sets TAG_NAME from github.ref_name and release-pr.yml never
sets it, so its absence distinguishes the two callers with no workflow
change. Adds the first tests for this script, covering both wordings, the
first-release range fallback, and the empty range.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TVrfA4Xy9wWmifB9JZc8Es
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Coverage report

  • Total: 86% (8849/10346 lines)

Top uncovered files

  • wildedge/integrations/transformers.py: 31.9% (196 lines missed)
  • wildedge/integrations/mlx.py: 28.7% (122 lines missed)
  • wildedge/integrations/ultralytics.py: 68.2% (82 lines missed)
  • wildedge/integrations/pytorch.py: 56.9% (81 lines missed)
  • wildedge/integrations/gguf.py: 62.7% (72 lines missed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant