policy-bot icon indicating copy to clipboard operation
policy-bot copied to clipboard

CODEOWNERS as the team name in approval_rules

Open huydinhle opened this issue 4 years ago • 8 comments

We would like to utilize the CODEOWNERS file for the teams array in approval_rules. Is there a way to do this ?

huydinhle avatar Apr 20 '20 22:04 huydinhle

At the moment, policy-bot has no integrations with the CODEOWNERS file. Can you provide some more detail about the use you have in mind?

bluekeyes avatar Apr 20 '20 22:04 bluekeyes

how will this work with bots?

NargiT avatar Sep 08 '20 11:09 NargiT

For large repositories, we might have one GitHub team, but the CODEOWNERs is more granular, giving ownership of specific packages/directories to individual team members, not the whole team. It would be nice to be able to enforce that specifically someone listed as a CODEOWNER (based on which files changed) is required to approve it

aw185176 avatar Mar 01 '21 17:03 aw185176

I like to utilize code owners too for code reviewer, but current GitHub requires code owner to have write permission, which is showstopper for us. If this project can support this feature, it will be very useful.

leslie-qiwa avatar Jun 08 '22 01:06 leslie-qiwa

We already make use of CODEOWNERS, especially to enable fine grained ownership in large repos. We want to use policy bot Being able to reference CODEOWNERS would also make the transition much easier.

Andrei-Predoiu avatar Jul 14 '23 07:07 Andrei-Predoiu

Internally we have implemented a simple tool that allows writing OWNERS files in individual directories which are valid subsets of the policy-bot config file and merging them into a single policy-bot file. It seems to work pretty well and allows monorepo teams to self-serve access for their directories. If there is interest, we could look into open-sourcing.

aw185176 avatar Jul 14 '23 18:07 aw185176

I think that would be very useful.

Andrei-Predoiu avatar Jul 15 '23 12:07 Andrei-Predoiu

@aw185176 We are lacking exactly that feature from policy-bot. Could you share your implementation here please?

papaslon avatar Mar 27 '24 08:03 papaslon