Skip to content

[Bug]: Release notes include duplicate entries from prior versions #1974

@seiya-koji

Description

@seiya-koji

Bug Description

I was looking through the release workflow and noticed something that might be worth flagging.
Apologies if this is already known or being tracked elsewhere.

v0.4.2 release notes include PRs already listed in v0.4.1, v0.4.0, and earlier. Each release should only show changes since the previous release.

Root cause: In release.yml L47, git describe --tags --abbrev=0 ${{ steps.version.outputs.tag }}^ walks the first-parent commit chain.
The previous tag (e.g. v0.4.1) is no longer on the first-parent path. git describe falls back to v0.1.10, widening the changelog range significantly.

PREVIOUS_TAG=$(git describe --tags --abbrev=0 ${{ steps.version.outputs.tag }}^ 2>/dev/null || echo "")

Steps to Reproduce

$ git describe --tags --abbrev=0 v0.4.2^
v0.1.10          # expected: v0.4.1

$ git describe --tags --abbrev=0 v0.4.0^
v0.1.10          # expected: v0.3.2 or v0.3.1

$ git merge-base --is-ancestor v0.4.1 v0.4.2; echo $?
1                # v0.4.1 is NOT an ancestor of v0.4.2

Expected Behavior

v0.4.2 notes contain only changes merged after v0.4.1.

Actual Behavior

v0.4.2 notes include changes from much older releases, going back to v0.1.10.

Specify CLI Version

N/A (CI workflow bug, not CLI)

AI Agent

Not applicable

Operating System

N/A

Python Version

N/A

Error Logs

Additional Context

Suggested fix: Replace git describe with a GitHub API call that doesn't depend on commit graph topology:

PREVIOUS_TAG=$(gh release list --limit 1 --exclude-drafts --json tagName -q '.[0].tagName' 2>/dev/null || echo "")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions