GitHub - Do you use GitHub teams for collaborator permissions?

Updated by Gordon Beeming [SSW] 1 year ago. See history

123
<introEmbed body={<> You can use teams within a repository to manage a whole group's permissions instead of setting permissions for each new member of the organisation. See [Organizing members into teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/organizing-members-into-teams). <imageEmbed alt="Image" size="large" showBorder={false} figureEmbed={{ preset: "goodExample", figure: 'Good example - Using a good teams structure to organize access', shouldDisplay: true }} src="/uploads/rules/use-github-teams-for-collaborator-permissions/GoodExampleUsingTeams.png" /> Correctly configuring your organisation's teams structure will make it easy to give members the permissions level that they need. You can add teams to repositories to manage their roles. <imageEmbed alt="Image" size="large" showBorder={false} figureEmbed={{ preset: "goodExample", figure: 'Good example - Using teams to assign roles in a repository', shouldDisplay: true }} src="/uploads/rules/use-github-teams-for-collaborator-permissions/TeamsOnRepo.png" /> </>} />

Another benefit of using teams is that you can mention a whole team in a discussion instead of individual members. See Mentioning people and teams

Use teams as maintainers over individuals

When you add a team to a repository, you can give the team a role that determines their access level to the repository. You can also add teams to issues and pull requests to manage their access to those resources. Often individuals are added to repositories as administrators, but this is not a good idea as it gives them destructive access to the repository. Instead, add a team to the repository and give the team the maintainer role.

Image

❌ Figure: Bad example - Individuals should not have Admin access to a repository

Image

✅ Figure: Good example - Teams should have Maintainer access to a repository

Acknowledgements

Brady Stroud
Gordon Beeming
Related rules

Need help?

SSW Consulting has over 30 years of experience developing awesome software solutions.

We open source.Loving SSW Rules? Star us on GitHub. Star