Skip to content

Revert commits aren't handled correctly #402

Open
@cpcloud

Description

@cpcloud

The problem

Commits that have revert: type(scope): message in them aren't handled correctly if they introduce would-be-release-producing-changes.

For example creating a commit like

type(scope): message

Did a thing

BREAKING CHANGE: Really did a thing

And then reverting that with a commit

revert: type(scope): message

This reverts commit $SHA1

Still results in a major release even though no major release changes have occurred.

Expected behavior

I would expect the behavior that is tested here https://github.com/semantic-release/commit-analyzer/blob/8bcde5c83e84a0373049250f1b35988621b11088/test/integration.test.js#L100-L112

That is:

Unreleased pairs of commits where the first commit would cause a version change and the second commit is a revert of the first do not cause any changes in the version.

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