Skip to content

Squashed commits result in issues when the changelog is generated #925

Open
@CSergienko

Description

@CSergienko

Describe the bug
Upstream dependency git-semver-tags used in this file does not support squashed commits, resulting in incorrect version numbers being generated in the previousTag.

Current behavior
We use a process of squashing branches before merging into the trunk. Back-merging the trunk into other branches pulls in those squashed commits, where the tag is part of the commit message. git-semver-tags cannot find these tags.

Expected behavior
When squashed commits are back-merged into a branch, semantic-version should be able to parse the tag correctly.

Environment

  • standard-version version(s): v9.3.2
  • Node/npm version: node 16.15.0/npm 8.5.5
  • OS: Windows 10 using Git Bash to emulate *nix environment.

Possible Solution
If no tags are found in the first pass using git-semver-tags, it would be useful to have a fallback to directly parsing output from git tag to find the latest tag. Optionally this could be patched in the upstream dependency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions