Skip to content
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

Guidelines when a PR results in more than one changelog entry #8

Open
Blacksmoke16 opened this issue May 11, 2022 · 2 comments
Open

Comments

@Blacksmoke16
Copy link

In most cases a PR results in one notable change within the changelog. However it might be worth adding some guidelines for when a single PR introduces multiple noteworthy changes. An example of this could be a 1.0.0 => 2.0.0 that happens within a single PR; which removes features, adds new features, and changes how previous features worked. Currently I can think of three ways to handle this:

  1. Add a single Changed change saying Refactor the code ... with a reference to the PR
  2. Add each noteworthy change with a reference to the same PR (possibly using a reference link like the version headings)
  3. Add a single Changed change, with sub bullets for the noteworthy parts
@vweevers
Copy link
Owner

I find it difficult to write guidelines for this because it depends on several factors (e.g. was everything planned out before the PR started or was the PR opened early in order to discuss open questions; was the PR squashed or do you have individual commits that can be referenced; how many changes are we talking about; are added features documented elsewhere; etc).

Option 1 can work if the referenced PR has a description (or short enough history) that explains the changes. The risk is that readers miss it. They might not follow the reference link if they assume the changelog summarizes everything for them.

Option 2 solves that (with a small cost of redundant information) and is my personal preference. Unless we're talking about a complete rewrite with many changes. There is a point where a changelog would be too long, too dry, too boring to read. In that case I'd prefer a separate upgrade guide, which also gives you a place to explain the motivation for refactoring, which can in turn motivate the reader to upgrade.

Option 3 is currently not allowed by Common Changelog, because too much information hurts the ability to quickly scan a changelog. More importantly, it muddles the categorization of changes.

Some general guidelines could be:

  1. Avoid the term "refactor" if it should not be interpreted as an insignificant, internal change
  2. If git history or pull requests do not sufficiently separate changes, then do this in the changelog
  3. If the resulting changelog would be too long (what is too long?) then ...

@vweevers
Copy link
Owner

vweevers commented May 22, 2022

possibly using a reference link like the version headings

I tend to avoid this so that content can be copied in full to e.g. a GitHub Release (though that is a limitation of tooling, really, so not a good argument on second thought).

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

No branches or pull requests

2 participants