mitogen icon indicating copy to clipboard operation
mitogen copied to clipboard

Pull requests often suffer a merge conflict in the changelog

Open moreati opened this issue 4 years ago • 6 comments

https://github.com/mitogen-hq/mitogen/blob/master/docs/changelog.rst is a hot spot for lines changed/added in a pull request. This causes merge conflicts when two pull requests both add a changelog entry. Consequences are

  • higher maintainer burden
  • worse contributor experience
  • delay in merging PRs, causing them to pile up

moreati avatar Jan 23 '21 11:01 moreati

A few possible mitigations and/or fixes, not all mutually exclusive

  1. Placeholders, e.g. seed the file with a lot of empty bullet points.
  2. Different merge strategy (e,g, merge=union)
  3. New folder/file structure One file per changelog entry, render/combine changelog during release
  4. Look at dedicated tools/workflows e.g. https://github.com/conventional-changelog, https://github.com/nettsundere/cyberlog

Reading material

  • https://about.gitlab.com/blog/2015/02/10/gitlab-reduced-merge-conflicts-by-90-percent-with-changelog-placeholders/
  • https://medium.com/@nettsundere/on-reducing-changelog-merge-conflicts-1eb23552630b

moreati avatar Jan 23 '21 12:01 moreati

Different merge strategy (e,g, merge=union)

Github UI does not respond to merge=union, e.g. https://github.com/moreati/changelog-merge-test/pull/2 shows as a conflict

moreati avatar Feb 07 '21 16:02 moreati

Hi @moreati, I'm Henry and I'm currently working on Merge Mamba. If your project is having trouble with merge conflicts you might find it helps to avoid them in future and it'll always be free for open source projects.

I'll be adding new features over the next few months so if there are any adjacent problems that your project would love a tool to help with, just let me know and I'll try and fit them into the roadmap.

henryjcee avatar Mar 08 '21 12:03 henryjcee

Looking at https://towncrier.readthedocs.io/ and https://scriv.readthedocs.io/

Open questions

  • Do non-maintainers need the tool installed to submit a PR? Can they be vendored to avoid that?
  • Can they be integrated with CI? Should they be?
  • Would pre-commit help?

moreati avatar Jul 04 '23 17:07 moreati

Single file script used by CPython https://github.com/python/core-workflow/blob/main/blurb/blurb.py, could be more suited to vendoring

moreati avatar Jul 05 '23 10:07 moreati

Currently leaning toward blurb.

moreati avatar Mar 06 '24 22:03 moreati