Nested teams in GitHub don't give you the control you think they do

Featured image for sharing metadata for article

GitHub has the concept of nested teams to make it possible to say manage hierarchical access in your organisation.

This can be really useful for indicating cases where i.e. you would expect all of your engineering team to be able to access specific repositories, instead of providing read-only access to all organisational members, or to be able to say "all of the Platform organisation can write to this repository, and everyone else can read".

However, it comes with a number of rough edges, and using it for authorization in your repository settings is almost never actually what you want to do.

It's a conversation I've had before, including today at work, so I thought it was worthwhile recording the reasoning so I could more easily refer back to it in the future.

This can be useful for general access but this doesn't work for a few cases:

More granular authorization

This makes sense, but it's worth calling out that you'll then need to add any child teams with any elevated access separately

Specifying CODEOWNERS

Even if everyone in the nested team has Write access to the repository, you will not have a valid CODEOWNERS file, as each individual team needs to be added as a collaborator, with Write access.

Requesting reviews

Similar to the above, you cannot request the review of a child team, unless that team is explicitly added as a collaborator, with Write access.

Written by Jamie Tanna's profile image Jamie Tanna on , and last updated on .

Content for this article is shared under the terms of the Creative Commons Attribution Non Commercial Share Alike 4.0 International, and code is shared under the Apache License 2.0.

#blogumentation #github.

This post was filed under articles.

Interactions with this post

Interactions with this post

Below you can find the interactions that this page has had using WebMention.

Have you written a response to this post? Let me know the URL:

Do you not have a website set up with WebMention capabilities? You can use Comment Parade.