So I have a CODEOWNERS file that looks like this:
-------
* @@"Backend" @@"Frontend"
**/*.js @@"Frontend"
**/*.java @@@"Backend
Check(@@"Globe Backend" >= 1)
Check(@@"Globe Frontend" >= 1)
--------
But I would only like to do those checks on the master branch. I would like the groups to be added on all prs but only require approval for merging into certain branches.
using `CODEOWNERS.destination_branch_pattern master` means the whole file is only used on the master branch where I would only like to use it for the check lines.
Hello Mandy!
I am Antoine from Mibex Software. From the look of your file (in particular your two `Check` clauses), it seems that you are using our DevSensei/Code Owners plugin for Data Center. So I take the chance to answer you.
You are right that adding the destination branch pattern disables the whole file, and not only the checks. Unfortunately, using `CODEOWNERS` file alone, there is no way to get that level of granularity.
That said, with recent versions of the plugin (at least 8.0), you have the possibility to rather use `devsensei.yaml` files (see the app's documentation). These configurations will give you the necessary flexibility to apply your checks only on certain branches.
Let me know if you want me to create such a file for you. Also, if you need to discuss private/sensitive information relative to your case, don't hesitate to create a support ticket in Mibex' channel (you can reach out via this link).
Best wishes,
Antoine
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.