I suggest adding the formatting check of configlet fmt
to the CI workflow. It should be enabled with a workflow configuration switch, so tracks can choose to have it. When enabled, it should bail out if formatting is required. It should not auto-commit it, because that does not work with PRs from contributors repositories and hides the real issue behind access rights failures.
Currently configlet create
re-writes the config.json
, which in turn re-formats the file. So if the file wasn’t formatted like configlet
would do, the real changes are hidden by / mixed with unrelated formatting changes. This can be avoided with keeping the files formatted automatically. But there currently is no option to check that in CI.
When tracks don’t want auto-formatted JSON files, or when major updates to the command are done, opting out should be easy. Having a workflow configuration switch to enable it would do that nicely.
As all the configlet
functionality is used organisation wide, I do not think it is reasonable to add it to each track individually.