Skip to content

Handle commits of type "revert" #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
f0rr0 opened this issue Aug 10, 2018 · 3 comments
Closed

Handle commits of type "revert" #84

f0rr0 opened this issue Aug 10, 2018 · 3 comments

Comments

@f0rr0
Copy link

f0rr0 commented Aug 10, 2018

Given commits: A -> B -> C -> D -> HEAD

I did:

$ git revert --no-commit D
$ git revert --no-commit C
$ git revert --no-commit B
$ git commit -m "revert(something): restore some other thing"

semantic-release skipped a new release for this commit.

Is this expected behaviour? What is the correct way to revert commits and make a new release?

@pvdlg pvdlg added the support label Aug 10, 2018
@pvdlg
Copy link
Member

pvdlg commented Aug 10, 2018

If you have a revert commit and the reverted commit within the same release (i.e. between the last release and HEAD) semantic-release will ignore both because as they cancel each other they don't change the code therefore doesn't require a release.

If you have a revert commit without the commit it revert in the release than semantic-release will do a patch release.

See #78 (comment)

See https://semantic-release.gitbook.io/semantic-release/support/faq#how-can-i-revert-a-release

@pvdlg
Copy link
Member

pvdlg commented Aug 15, 2018

Closing as I imagine the previous comment answered your question.

@pvdlg pvdlg closed this as completed Aug 15, 2018
@ghost ghost removed the support label Aug 15, 2018
@guillaumearm
Copy link

Here I'm having the issue with a prelease branch, is it intended ?

  1. I push a feat: something on my prerelease branch -> it make a pre-release
  2. I push a revert commit -> it does not make the pre-release

Am I missing something ?
Should I create a separate issue for this ?

thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants