-
Notifications
You must be signed in to change notification settings - Fork 53
Description
SUMMARY
I think this repo should provide a snippet example how collections can/should lint their changelogs (if they use antsibull at least).
This started as a discussion in #ansible-community with @gundalow and @felixfontein, and I thought writing down my ideas here would be good.
ISSUE TYPE
- Feature Idea
COMPONENT NAME
examples
ADDITIONAL INFORMATION
I think the following two checks should be executed:
- ensure a PR needs and has a changelog snippet
- ensure the snippet has valid syntax (
antsibull-changelog lint)
Number 2 is rather easy, we have a tool for that. Number 1 is not.
I think we should only enforce changelog entries for parts of the repository (ain't nobody needs a changelog entry when we fix something in .github/), so I think the example should only care about plugins/ (the users then can easily extend that to their needs).
On IRC it was mentioned that new plugins don't need a fragment -- correct, but at the same time nothing validates the version_added entry right now (will that change?) and (as also mentioned on IRC) filter plugins don't have that anyways.
So the simple (lol) logic that we could go for today would be something like:
if (file changed in plugins/ OR file deleted in plugins/ OR file added in plugins/filters/):
ensure file added in changelogs/fragments/
This won't catch everything, but it's IMHO a good enough 80% solution we should start wirh.
From experience in other projects, there should be a way to ignore this check. Either by adding a "trivial" label or by adding "no issue" somewhere in the commit/PR message. So that will make the above logic a bit more convoluted (at least when implementing it), but at the same time it's not strictly MVP.