-
Notifications
You must be signed in to change notification settings - Fork 70
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
[PROPOSAL] Build a GitHub app / workflow that runs on each PR that modifies the CODEOWNERS and MAINTAINERS files to make sure they are in sync #177
Comments
Hello @AMoo-Miki @peternied , I am new to contributing to opensource project. I would like to work on this. If I do diff, or delta or compare the comparison fails. The contents of the file is not same. May I know exactly what needs to be checked before failing the PR. Does CODEOWNERS file must look same as MAINTAINERS file or vice versa? Thanks in advance. |
@hakunamatata-git Thanks for your interest, the files are not in the same format so diffs would be expected not to match. Coming up with a structured way to read the files and interpret the different maintainers definitions would be part of this work to resolve this issue. |
I have working code that reads/extracts MAINTAINERS and CODEOWNERS here: https://github.com/opensearch-project/project-tools/blob/69f056b6ab1c2868c54537e2a111081da569fc59/lib/github/repo.rb#L39, https://github.com/opensearch-project/project-tools/blob/69f056b6ab1c2868c54537e2a111081da569fc59/lib/github/repo.rb#L101. |
Hello @peternied @AMoo-Miki @dblock I have wrote this yaml. Can some one please validate if I am on the right path. |
The contents of these files are completely different, they need to be parsed. |
Hello @dblock @peternied @AMoo-Miki Thank you for the response. I have parsed the files and ran locally to test the script. Please validate and let me know if I'm in the right direction. |
Thanks! Comparison is only one part of the problem. Your implementation is not as generic as the Ruby code I linked, so I think it's not the right direction, plus going from Ruby to Python is not the goal. We're looking for a GitHub action that one can reuse in any repo that performs the task asked here. Examples of reusable GitHub actions are on the GitHub marketplace: https://github.com/marketplace. I want to be able to write something like this:
And it should be appending errors to the GitHub pull request when these are out of sync. Btw, you should be creating GitHub repos for your code, don't attach zips ;) |
What/Why
What are you proposing?
A method for preventing CODEOWNERS and MAINTAINERS from drifting apart.
What users have asked for this feature?
Repository maintainers would like to have a workflow / app that examines changes made to CODEOWNERS and MAINTAINERS in a PR and fail if they are not in sync.
What problems are you trying to solve? Why should it be built? Any reason not to?
Repository maintainers are not a fan of manually reviewing changes made to CODEOWNERS and MAINTAINERS to make sure they are in sync.
What is the developer experience going to be?
A developer making changes to either of CODEOWNERS and MAINTAINERS files will have their PRs fail if the two files are not in sync. Developers of PRs that have no changes to CODEOWNERS and MAINTAINERS will have the workflow skipped.
Are there any security considerations?
The workflow / app will not have access to verify the accuracy of the CODEOWNERS and MAINTAINERS files; it only checks if they are in sync.
The text was updated successfully, but these errors were encountered: