Skip to content

Add support to ignore reverted commits #382

@schoetbi

Description

@schoetbi

I just reverted a (conventional) commit. The problem is, that in the release notes this feature is still included. I have not found a way to exclude (ignore) a commit.

Would it be a good idea to add parsers that ignore previously added commits? For example, I have the following history.

  • sha=a001 message=Start
  • sha=a002 message=feat: a new feature

- ...

  • sha=a003 message=revert a002 feat: a new feature

If git cliff supported revert parsers, I could do something like this

commit_parsers = [
# ...
 { message = "^revert\s+(?<sha>.{40})", revert="true" }
]

Another option would be to add the git SHA explicitly

commit_parsers = [
# ...
 { sha = "7976e3a76d3a27e8024d95eeb51d75bbd7391e95", skip="true" }
]

Or is there another option that I did not find in the documentation?

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions