kyma-project / test-infra

Test infrastructure for the Kyma project.
https://status.build.kyma-project.io/
Apache License 2.0
38 stars 181 forks source link

Exclude automatically generated .md files from reviews. #6250

Closed dekiel closed 1 year ago

dekiel commented 1 year ago

A file inventory-integration.md is automatically generated when prowjob definition change. Requiring review from technical writers doesn't make sense for this file. In fact this file should not be owned by anyone as changes in this file are reviewed by owners of prowjob definition files.

Once we will have more automatically generated .md files, this problem will appear more often.

We should rebuild our CODEOWNERS file to allow us exclude autogenerated files from ownership. To make sure we will not add unwanted not owned files later we could add codeowners-validator app https://github.com/mszostok/codeowners-validator

The issue was reported in https://github.com/kyma-project/test-infra/pull/6238

Ressetkk commented 1 year ago

You can't do it with CODEOWNERS. CODEOWNERS work with the regular expression that does not support negative matches. You can't simply exclude only one .md file from the match. https://github.com/kyma-project/test-infra/blob/dce4769a4c2dbcd4e358bf5bf93972c41df6d32d/CODEOWNERS#L61

@kyma-project/technical-writers also requested to explicitly have control over all Markdown files. If you really want to have that feature, then good luck including every markdown file in CODEOWNERS, but one.

dekiel commented 1 year ago

A file /test-inventory-integration.md is now not owned by any specific team or user. Changes to that file require approval from any CODEOWNER. Because changes in this file are caused by changes in other files in repository, owners of other changed files will have to approve changes. Our technical writers will not be requested for review in such scenario anymore. We don't need a codeowners-validator to detected other not owned files because exception is strict for test-inventory-integratioin.md file only. Other global rules apply as they before.