codeowners file in github repo not working

Viewed 7919

I'm trying to set up a codeowners file in the root of my repo. I have it in place with myself as the codeowner for anything being merged into the master branch. Alas every time I create a pull request, to test if it is working or not. It does not assign me to the pull request. Can anyone lend some assistance?

For notes I am the owner of the organisation and admin or owner for the branch. I don't know if that affects this.

my code owners file is as follows:

codeowners file

I have created a rule for the branch master to enforce 2 reviewers and a code owner as seen below:

Branch protection

I'd appreciate any help you could give me as I'm not very upskilled when it comes to managing a github repo.

Thanks.

2 Answers

Just to try and clarify, currently on GitHub the author can't review their own PR. Likewise, you can't request the author to review their own PR. So it makes sense that CODEOWNERS would just skip you if you're the one opening the PRs to test it!

GitHub review screenshot

If you are the only code owner, which I am in my case. Github will not include you.

When all other members post a PR it works fine.

Related