question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Avoid merge conflicts in CHANGELOG.md

See original GitHub issue

With the current changelog policy (add an entry as part of the PR, all in one file) it’s quite easy to run into merge conflicts as features are developed concurrently. This is not a problem unique to Prefect, many projects have run into this issue. There are three common solutions:

  • Add a custom merge strategy for the CHANGELOG.md file (merge=union) to better handle these conflicts. This will usually work, but may run into issues if concurrently added features have very similar lines.
  • Split the changelog into file-per-feature, and use a tool (towncrier is popular) to generate the final changelog from this before release.
  • Add a bunch of filler entries (e.g. empty - list rows), and rely on developers adding entries in different spots to avoid merge conflicts.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jcristcommented, Apr 10, 2020

It looks like github doesn’t currently support merge=union: https://github.com/isaacs/github/issues/487.

0reactions
jcristcommented, May 8, 2020

If we were to make our own tool, I’d probably have the filename be the PR or issue number (for uniqueness, filename not significant). I’d also use yaml to structure the content.

I went ahead and did this in #2529.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How we solved GitLab's CHANGELOG conflict crisis
This post outlines how we completely eliminated changelog-related merge conflicts, removed bottlenecks for contributions, and automated a ...
Read more >
Keep a Changelog without Conflicts | Uptech Studio
For years, like many others, we have maintained CHANGELOG.md files inside our ... Changelog entry and the code while avoiding the conflicts all...
Read more >
How to best handle conflicts when everyone commits ... - Reddit
How to best handle conflicts when everyone commits to CHANGELOG.md file? ... Make the merge locally and solve the conflicts with any mergetool, ......
Read more >
Merge conflicts when everyone adds to CHANGELOG.md file
We have a changelog.md file. When you make a change... you can optionally add a line to the top of this file, and...
Read more >
Resolving Changelog Merge Conflict Madness - Sean Wallis
Fortunately this isn't a new problem. GitLab experienced a very similar changelog conflict crisis, which gave us the basis for our solution.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found