Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Inconsistent unreleased commit list in next_version() and ReleaseHistory.from_git_history() leading to empty changelog and release #1252

Open
Labels
bugSomething isn't working properlyconfirmedPrevent from becoming stale
@dzmitrysliaptsou

Description

@dzmitrysliaptsou

Bug Report

Description

First of all, thank you for a great tool, you did an amazing work!

I have a usual flow with GitHub action that is running after the merge (exactly the one that is described indocumentation). And it looks like in case of merge commits it can produce empty release and changelog, but still bump a version.
I havemain branchandfeature` branch. The history looks like this

*   v1.2.0 release (main)*   Merge `feature into `main`|  \|   *   Merge 'main' into 'feature' to get latest changes (feature)| / ||   |  *   |    v1.1.0 release (main)*   |    Some commit in main|   ||   *   feat: My new feature (feature)|  /  |

Expected behavior

v1.2.0 release is created, release containsfeat: My new feature commit in changelog and release.

Actual behavior

v1.2.0 release is created, but CHANGELOG.md and GitHub release are empty, they don't containfeat: My new feature, just blank

## v1.2.0 (2025-05-23)

Environment

  • Operating System (w/ version): Ubuntu 25.04
  • Python version: 3.10
  • Pip version: 25.1.1
  • Semantic-release version: 9.21.1
  • Build tool (w/ version): None

Configuration

Semantic Release Configuration
[tool.semantic_release]version_toml = ["pyproject.toml:project.version"][tool.semantic_release.changelog]mode ="update"

Additional context

As I understand, the problem is not inpython-semantic-release directly; the problem is thegit log output format. Even withtopo_order=True here, it still puts myfeat: My new feature commit before thev1.1.0 release commit in the history. It looks like after theMerge 'main' into 'feature' to add the latest changes commit, thegit log command decided to show commits frommain before showing commits fromfeature.

Why the PR title mentions inconsistency is because in the version resolving logic, the_traverse_graph_for_commits() function returns the correct list of new commits since the last release.
As a result, the version is calculated correctly, but there are no new commits in the release history, so the changelog and release notes are empty.

An obvious idea would be to use_traverse_graph_for_commits()-like logic inReleaseHistory.from_git_history() to getunreleased commits. But I assume it's not that simple, or it would have been implemented this way already.
I'm happy to provide more info or prepare a PR if you have an idea of how to deal with this behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working properlyconfirmedPrevent from becoming stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp