mergify icon indicating copy to clipboard operation
mergify copied to clipboard

Path based reviews

Open Toflar opened this issue 6 years ago • 5 comments

Hi, not sure if this is the right place to ask or propose this idea but what would be really great is if you could automatically merge PRs that only affect changed files of a certain path. The use case would be something like a central repository that is used for meta data such as for example Symfony's recipes contrib repo (https://github.com/symfony/recipes-contrib). There are loads of recipes for all kinds of different vendors and everybody is allowed to add PRs but you cannot grant 500 people push access but rather just want them to review and approve PRs that affect e.g. their own vendor path. That's why it would be awesome if you could configure people that are sort of "owner" of a given path so that even though these users do not have push access to the repo, they can trigger mergify by approving the PR.

So something like

path_owners:
   - { path: '/vendor', users: ['foobar', 'other-person'] }
   - { path: '/different-path/sub-directory', users: ['john-doe'] }

Not sure if you understand what I'm talking about 😄

Toflar avatar Aug 17 '18 14:08 Toflar

This is the right place and an excellent idea.

jd avatar Aug 20 '18 10:08 jd

I think we already support that. In required_pull_request_reviews section you can set require_code_owner_reviews to true and then create the CODEOWNERS file.

https://doc.mergify.io/configuration.html#required-reviews https://help.github.com/articles/about-codeowners

Can you check it does what you want ?

sileht avatar Aug 21 '18 15:08 sileht

I tried it today and unfortunately it does not quite what I need because of this:

The people you choose as code owners must have write permissions for the repository.

Which kind of renders the whole idea useless because I want the mergify bot to merge stuff 😄

Toflar avatar Aug 24 '18 11:08 Toflar

Any news here? :)

Toflar avatar Feb 11 '19 13:02 Toflar

I think we already support that. In required_pull_request_reviews section you can set require_code_owner_reviews to true and then create the CODEOWNERS file.

https://doc.mergify.io/configuration.html#required-reviews https://help.github.com/articles/about-codeowners

Can you check it does what you want ?

This doesn't seem to exist anymore, is this feature still supported?

howardjohn avatar Mar 27 '19 14:03 howardjohn