Skip to content

fix: stage CHANGELOG.md in semantic-release build_command#301

Merged
ichoosetoaccept merged 1 commit intomainfrom
ismart/dot-393-changelog-not-staged
Apr 12, 2026
Merged

fix: stage CHANGELOG.md in semantic-release build_command#301
ichoosetoaccept merged 1 commit intomainfrom
ismart/dot-393-changelog-not-staged

Conversation

@ichoosetoaccept
Copy link
Copy Markdown
Member

@ichoosetoaccept ichoosetoaccept commented Apr 12, 2026

Closes DOT-393

Summary

  • Add CHANGELOG.md to git add in the semantic-release build_command in both pyproject.toml and project/pyproject.toml.jinja

Problem

build_command only staged uv.lock, so CHANGELOG.md was never included in the release commit despite mode = "update" being configured. GitHub Releases were unaffected (generated separately), but the committed CHANGELOG.md stayed empty across releases.

@ichoosetoaccept
Copy link
Copy Markdown
Member Author

This change is part of the following stack:

Change managed by git-spice.

@linear
Copy link
Copy Markdown

linear bot commented Apr 12, 2026

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 12, 2026

Greptile Summary

This PR fixes a missing CHANGELOG.md in the git add staging step of the semantic-release build_command, applied consistently to both the template repo's own pyproject.toml and the Jinja template used in generated projects. Without staging CHANGELOG.md, python-semantic-release would write the changelog but never commit it, silently dropping it from each release.

Confidence Score: 5/5

Safe to merge — targeted one-line fix in both configs with no side effects

Both changes are minimal and correct: CHANGELOG.md is written by semantic-release before build_command runs, so staging it here guarantees it lands in the release commit. The fix is applied symmetrically to the repo's own config and the Jinja template. No logic, ordering, or conditional issues found.

No files require special attention

Important Files Changed

Filename Overview
pyproject.toml Adds CHANGELOG.md to git add in build_command so the changelog is staged before the semantic-release commit
project/pyproject.toml.jinja Same fix applied to the generated-project template; CHANGELOG.md is now staged alongside uv.lock before uv build

Sequence Diagram

sequenceDiagram
    participant SR as semantic-release
    participant FS as Filesystem
    participant Git as Git index

    SR->>FS: Bump version in pyproject.toml
    SR->>FS: Write/update CHANGELOG.md
    SR->>SR: Run build_command
    SR->>SR: uv lock --upgrade-package $PACKAGE_NAME
    SR->>FS: Updates uv.lock
    SR->>Git: git add uv.lock CHANGELOG.md
    Note over Git: CHANGELOG.md now staged (this PR's fix)
    SR->>FS: uv build (generated projects only)
    SR->>Git: Commit release (all staged files included)
Loading

Reviews (1): Last reviewed commit: "fix: stage CHANGELOG.md in semantic-rele..." | Re-trigger Greptile

@ichoosetoaccept ichoosetoaccept merged commit 1b31caa into main Apr 12, 2026
6 checks passed
@ichoosetoaccept ichoosetoaccept deleted the ismart/dot-393-changelog-not-staged branch April 12, 2026 14:56
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