conventional-changelog icon indicating copy to clipboard operation
conventional-changelog copied to clipboard

feat: Add option merges to keep merge commits #374

Open Chklang opened this issue 6 years ago • 19 comments

Add option "merges" into conventional options to keep merge commits into conventional-changelog process

Chklang avatar Sep 24 '18 10:09 Chklang

Coverage Status

Coverage decreased (-8.5%) to 84.211% when pulling ce31abde8ea2df92b4b190243bd68ad26ed7d6f8 on Chklang:master into 35e279d40603b0969c6d622514f5c0984c5bf309 on conventional-changelog:master.

coveralls avatar Sep 24 '18 10:09 coveralls

@conventional-changelog/conventional-changelog thoughts on this change? Seems reasonable to me.

hutson avatar May 06 '19 01:05 hutson

@Chklang this seems reasonable to me too, sorry for dropping this on the floor for so long.

Mind rebasing with master, and we can try to land this eventually?

bcoe avatar Jul 29 '19 05:07 bcoe

Any chance to get this merged? Currently it's not possible to use conventional-changelog for releases using git-flow where releases are done using release branches that get merged into master. Since the parameter '--no-merges' is hard-coded it is not possible to find tags on merge commits.

ahochsteger avatar Oct 11 '19 20:10 ahochsteger

@ahochsteger +1 on that. git flow release automatically tags merge commits and they end up being totally ignored by conventional-changelog.

This is the root cause of #571.

nfantone avatar Dec 17 '19 23:12 nfantone

Would be nice to expose this as a flag in the CLI, as well.

nfantone avatar Dec 17 '19 23:12 nfantone

I've tested this branch and, for some reason, enabling merges option causes the parser to ignore tags on commits that are not merges.

Is there any way to have both? Why should we even care about these details, in the first place? If a commit is tagged, just pull the tag name from it.

nfantone avatar Dec 17 '19 23:12 nfantone

If you set config.gitRawCommitsOpts.merge to true, shouldn't it overwrite the default value? Maybe add a unit test to clarify?

stevemao avatar Dec 18 '19 00:12 stevemao

It seems reasonable to me :)

damianopetrungaro avatar Dec 20 '19 15:12 damianopetrungaro

@stevemao @damianopetrungaro Have you actually tested this? I can't make it work by setting this option alone. See #571.

nfantone avatar Dec 21 '19 05:12 nfantone

I find setting a config file which has following content makes merge commits reserved. module.exports = { gitRawCommitsOpts :{ merges: null } }

szhang-code avatar Dec 25 '19 09:12 szhang-code

If I hard-code to true in the current version, I get the expected set of releases, but now don't see any actual entries for the commits between tags. I think #571 may be the issue I'm seeing as well.

wyardley avatar Jan 18 '20 00:01 wyardley

Seems like just omitting that option would be the way to go

https://github.com/fastlane/fastlane/blob/39afb4defa1def891506a1eaabc374ebd289e9b2/fastlane/lib/fastlane/helper/git_helper.rb#L124

mediavrog avatar Feb 14 '20 01:02 mediavrog

Started a more complete take on this issue inspired by the fastlane implementation https://github.com/conventional-changelog/conventional-changelog/pull/595

mediavrog avatar Feb 14 '20 02:02 mediavrog

@nfantone you need a config file to pass option in.

stevemao avatar Feb 14 '20 02:02 stevemao

I think instead of hacking this one, we should look at how to pass in options in general. Currently not all options are available in cli but the api is there.

stevemao avatar Feb 14 '20 02:02 stevemao

@stevemao Maybe this can help https://github.com/conventional-changelog/conventional-changelog/pull/595

mediavrog avatar Feb 14 '20 06:02 mediavrog

We have the same problem with tagged merge commits. Is there any new fix (E.g. by config) available in the latest version?

dave-shapiro-o avatar Jun 23 '23 14:06 dave-shapiro-o

Same problem here, is there any progress on this issue?

demirtasdurmus avatar Jan 15 '24 18:01 demirtasdurmus