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

Better support for change groups in our Keep a Changelog parser & writer #153

Open
6 of 7 tasks
colincasey opened this issue Oct 5, 2023 · 7 comments
Open
6 of 7 tasks
Labels
enhancement New feature or request question Further information is requested

Comments

@colincasey
Copy link
Contributor

colincasey commented Oct 5, 2023

Our representation of the Keep a Changelog format is compliant with the following Guiding Principles from the spec:

  • Changelogs are for humans, not machines.
  • There should be an entry for every single version.
  • The same types of changes should be grouped.
  • Versions and sections should be linkable.
  • The latest version comes first.
  • The release date of each version is displayed.
  • Mention whether you follow Semantic Versioning.

As noted above, we currently do not parse or validate the "change groups" listed in the spec:

  • Added for new features.
  • Changed for changes in existing functionality.
  • Deprecated for soon-to-be removed features.
  • Removed for now removed features.
  • Fixed for any bug fixes.
  • Security in case of vulnerabilities.

Instead, the content between version entries is simply treated as literal text. This is because we have existing changelogs that aren't in compliance with the spec. For example:

We also automatically add an default - No Changes. entry when a version is bumped as part of our fixed versioning strategy and there are no notable changes from the last version. This does not have an easy representation in the spec.

Questions to discuss:

  • How should we deal with those existing non-compliant changelogs?
  • How should we track the "No Changes" case?
@colincasey colincasey added enhancement New feature or request question Further information is requested labels Oct 5, 2023
@colincasey
Copy link
Contributor Author

For "No Changes" I wonder if we should follow similar guidance for yanked releases given in the FAQ:

Yanked releases are versions that had to be pulled because of a serious bug or security issue. Often these versions don't even appear in change logs. They should. This is how you should display them:

## [0.0.5] - 2014-12-13 [YANKED]

The [YANKED] tag is loud for a reason. It's important for people to notice it. Since it's surrounded by brackets it's also easier to parse programmatically.

We could do something similar for releases with no changes and use ## [0.0.5] - 2014-12-13 [NO CHANGES]. This would make it easier to enforce parsing of the version entry content since it would avoid having to deal with both changelog groups & the "No Changes" special case.

@Malax
Copy link
Member

Malax commented Oct 6, 2023

How should we deal with those existing non-compliant changelogs?

By fixing them. We have full control over them and if they are not compliant to the spec they're supposed to follow they are wrong and need fixing (regardless of the release automation). I created an issue for the JVM one: heroku/buildpacks-jvm#595

@edmorley
Copy link
Member

I've fixed Go's changelog in heroku/buildpacks-go#172.

@Malax
Copy link
Member

Malax commented Aug 30, 2024

The JVM changelogs should now be in order as soon as heroku/buildpacks-jvm#716 is merged. Do we have further blockers?

@colincasey
Copy link
Contributor Author

Yes, but I'm not sure how many are non-compliant. So to move this issue along without breaking anyone for release automation I think we'd first need:

  • A shared changelog validator GitHub action added to this repo (similar to our changelog modification action)
  • The above validation action wired up in each CNB project
  • Also, there is a bug in https://github.com/heroku/keep_a_changelog_file that sometimes silently drops invalid markdown items instead of failing

I've been meaning to look into those but just haven't had the time 😞

@edmorley
Copy link
Member

edmorley commented Sep 3, 2024

Perhaps to avoid the overhead of another shared action and having to add it everywhere, we could start with having the prepare-release workflow run some checks and output warnings (the kind that get shown on the checks overview)?

@colincasey
Copy link
Contributor Author

Yeah, that's a reasonable alternative. As long as we can surface changelog issues without blocking releases for now. We can enable stricter enforcement later on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants