ts-rust-zig-deez
ts-rust-zig-deez copied to clipboard
Code owners
I have to get this working... unsure when i will, but i will! Merged pr #90 for this, just never used codeowners as a way to manage the suppository, glad to try
This CODEOWNERS file only starts being meaningful once people/orgs listed in it have write permissions to the repo.
And it's purpose is to manage branch protection rules: people listed there are automatically requested for review when someone opens a pull request that modifies code that they own as specified in it.
P.S.: Also, to decrease overall clutter in the root of the repo, that file could be moved to .github/ folder and it would still operate the same here on GitHub.
@novusnota is this branch protection stuff automagic?
so if ShyRy is elixerdeez, he cannot merge a change with zig?
@ThePrimeagen yes! But first one has to:
- Enable branch protection rule for master
- Check "Require pull requests before merging"
- Check "Require review from Code Owners"
- Validate the correctness of CODEOWNERS file (gitattributes-like format) — GitHub will tell something like "This CODEOWNERS file is valid" when viewing it from the web interface.
And then anytime anyone touches your Zig nuts, merging would be blocked until you explicitly grant your permission.
But if, say, ShyRy commits something for elixerdeez, GitHub would still require a review, but only from him and any other code owners assigned to elixerdeez in CODEOWNERS file. Self-admission, baby!
Rules in a file work quite simple (like in CSS): successive rules override preceding ones.
Here's an example:
# You here are supreme code owner of everything
* @ThePrimeagen
# ShyRy with elixerdeez
/elixir/ @ryanwinchester
ShyRy here is now responsible for elixerdeez, so GitHub won't bother you when he edits his files, but if he starts editing anything else, which isn't /elixir, GitHub would require a code review from the related code owner. If there is none — it would require review from you.
Is there a way to enable code owners to approve their own PRs (to the respective folders of course)? I have #43 that I would like to submit for Roc, and I am the code owner for Roc. I just can't submit cause it lacks review and I can't review my own PR. Maybe there is some other way to handle this?
@bhansconnect yes, code owners also need to have write permissions to the repo for that
Is codeowners setup completed? I don't see option to merge my own pull requests. Don't know if I doing it correct.
Is codeowners setup completed? I don't see option to merge my own pull requests. Don't know if I doing it correct.
It's not completed yet, you can tag me for now if your PR is ready to be merged.
Is codeowners setup completed? I don't see option to merge my own pull requests. Don't know if I doing it correct.
It's not completed yet, you can tag me for now if your PR is ready to be merged.
Any updates on this?