CODEOWNERS works with users but not teams #22751
-
In https://github.com/ciena-blueplanet/ciena-devops-testbed when using the CODEOWNERS entries of
and making a PR changing just the .THROWAWAY file all three users (@notmessenger @juwara0 @job13er) are added as reviewers and it only takes one approver for the PR to be mergeable (ciena-blueplanet/ciena-devops-testbed#45) When the .THROWAWAY file and the README.md file are changed it requires one of the three users (@notmessenger @juwara0 @job13er) as well as one of the two (@notmessenger @juwara0) to be mergeable (ciena-blueplanet/ciena-devops-testbed#46) This is exactly what I expected to happen per https://help.github.com/articles/about-codeowners/ However when I attempt to do similar via using teams things get all messed up and I’m not sure why. I created the https://github.com/orgs/ciena-blueplanet/teams/reviewers-tooling/members team and added @notmessenger, @juwara0, and @job13er to it. I created the https://github.com/orgs/ciena-blueplanet/teams/owners-architecture team and added @notmessenger and @juwara0 to it. I then used these CODEOWNERS entries:
and got this result for only the .THROWAWAY file changed (ciena-blueplanet/ciena-devops-testbed#45): and this result for the .THROWAWAY file and README.md file changed (ciena-blueplanet/ciena-devops-testbed#46): Have I set the teams and/or CODEOWNERS up correctly? Sorry that I only have screenshots for the failed state - I am using the same repo to work through these issues so I made changes to the files for different scenarios I’m testing. It may even be likely that the current content of the CODEOWNERS file are different than what I’ve pasted here as I’m still making changes but the content pasted here is accurate and I will not be making any changes to the teams I have setup so they can be looked at. You can ignore the double travis-ci required status checks - I know why there are two and it is unrelated to this issue. I also now realize that my screen captures did not capture the reviewers that were assigned. For PR 45 it did not assign everyone in the https://github.com/orgs/ciena-blueplanet/teams/reviewers-tooling/members team as I expected, and like it does when individual users are listed. For PR 46 it assigned no one at all. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 1 reply
-
I have received this reply from the GitHub Support Staff which I will give a try and report back on the status of:
|
Beta Was this translation helpful? Give feedback.
-
This is exactly what the problem was. |
Beta Was this translation helpful? Give feedback.
-
I’m having a similar issue, but I’m pretty sure mine is not being caused by team permissions. Here’s my CODEOWNERS file (with org and team name anonymized):
However, when I make a PR in a repo with that CODEOWNERS file, no members of the team are notified for review. After seeing @notmessenger’s message from GitHub Support saying that the team needs write permissions for the repo, I verified the team had write permission for the repo, but subsequent PRs still do not kick off a review request by team members. Am I missing something else? I can replace the “@myorganization/MyTeam” part with a list of all the team users and reviews are automatically requested, but I want to be able to do this on a team basis, not on a user-by-user basis. The only other two confounding factors I can think of are these:
|
Beta Was this translation helpful? Give feedback.
-
Following up – I did speak to GitHub support, and the issue was the “Secret” status for the team. CODEOWNER notifications to members of a “Secret” team (at least as of late October) just aren’t supported. Luckily my team was able to switch over to “Visible” (the opposite of Secret status), at which point the CODEOWNERS notifications worked exactly as expected. If you need to keep the Secret status though, I think there’s currently no way to get the auto notifications as well. |
Beta Was this translation helpful? Give feedback.
-
I’m having this problem also.
I’m not sure what else to try.
I have this issue both in my BTW, the team I’m trying to hook up is CODEOWNERSI know this worked in the past. It stopped working the day I added HubI know this part is unrelated but I’m hoping it’s helpful… I’m trying to assign team reviewers via This is the API call that fails. (Hub executes the POST.)
|
Beta Was this translation helpful? Give feedback.
-
Ours just started having this issue as well. We switched from having a lot of members to having teams with members (at at least the top level team i’m on is definitely visible), and now our PRs don’t have CODEOWNERS properly assigned either. |
Beta Was this translation helpful? Give feedback.
-
Was there ever a fix to this? Seems that granting the team write access wasn't enough for some to fix this behavior. |
Beta Was this translation helpful? Give feedback.
-
Having same problem. Team has write access, is also |
Beta Was this translation helpful? Give feedback.
I have received this reply from the GitHub Support Staff which I will give a try and report back on the status of: