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

Validate CODEOWNERS #4

Merged
merged 6 commits into from
Apr 24, 2024
Merged

Validate CODEOWNERS #4

merged 6 commits into from
Apr 24, 2024

Conversation

infinisil
Copy link
Member

@infinisil infinisil commented Apr 23, 2024

This starts validating the CODEOWNERS file using https://github.com/mszostok/codeowners-validator and, because that project doesn't support it yet, a custom script to make sure that everybody has write access.

To make this work, I introduced the OWNERS_VALIDATOR_GITHUB_SECRET secret to contain a read-only personal access token of mine for now (expires in 30 days). This is needed because it's not possible to query for who has write access without that. In the future we should switch to a GitHub App instead.

Because we need to switch to pull_request_target to trigger CI, I had to test this in a separate PR, but it works:

Furthermore, the check to make sure everybody has write access is also run in the regular monthly review, which I can confirm to work correctly:

@infinisil infinisil force-pushed the validate-codeowners branch 3 times, most recently from 50d3496 to bf702b6 Compare April 23, 2024 21:38
Also make CI run for all pull requests, not just ones to the main branch.
This allows testing pull_request_target changes in this repo.
@infinisil infinisil force-pushed the validate-codeowners branch 5 times, most recently from 6f023bf to 569ec01 Compare April 23, 2024 22:10
@infinisil infinisil marked this pull request as ready for review April 23, 2024 22:20
@infinisil infinisil requested a review from zimbatm as a code owner April 23, 2024 22:20
@infinisil infinisil force-pushed the validate-codeowners branch 2 times, most recently from 5640fc3 to 0454b67 Compare April 23, 2024 23:26
@infinisil infinisil force-pushed the validate-codeowners branch from 0454b67 to 9028d17 Compare April 24, 2024 19:26
@infinisil
Copy link
Member Author

Now also added @zimbatm as codeowner to all files that didn't have one before.

@zimbatm zimbatm merged commit 163aa6b into main Apr 24, 2024
@zimbatm zimbatm deleted the validate-codeowners branch April 24, 2024 19:34
@zimbatm
Copy link
Member

zimbatm commented Apr 24, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants