invertase / melos

🌋 A tool for managing Dart projects with multiple packages. With IntelliJ and Vscode IDE support. Supports automated versioning, changelogs & publishing via Conventional Commits.
https://melos.invertase.dev/~melos-latest
Apache License 2.0
1.07k stars 193 forks source link

request: allow for only including Merge Commits for versioning and Changelogs #697

Open timcreatedit opened 2 months ago

timcreatedit commented 2 months ago

Is there an existing feature request for this?

Command

No response

Description

I would love to be able to set up Melos such that only merge commits are considered for changelog and versioning, so that each PR can become one entry in the changelog, but all inbetween commits are retained in the git history.

Reasoning

Lots of people use squash merges in their repos so that not every single commit on the branch is included on main and in the changelog generated by Melos. However, squash merging can introduce a lot of headaches, especially if many features are worked on at the same time. That's why I (and many teams) prefer normal merge commits.

Additional context and comments

No response

spydon commented 2 months ago

Doesn't it work if you don't add conventional commit tags to the commits within the PR and only have them on the merge commit? Related PR: https://github.com/invertase/melos/pull/407

To only use merge commits for changelog and versioning and not the conventional commits within the PR I feel might be a bit outside of the scope of Melos. If not a lot of people want it of course, but you're the first one I hear that would want this, since usually you want to have all conventional commits in the changelog.