Create, rename and delete teams
Learn how to create, rename, and delete teams using CBG
This guide provides instructions on how to create, rename, and delete teams using the Codebase Governor (CBG). Follow these steps to efficiently manage your teams in Flutter-Global.
Prerequisites
Before you start managing teams, make sure you have read the Basic Concepts and Rules of Teams in Codebase Governor. You should also have a basic understanding of YAML syntax. You can learn more from this article.
Team Creation
To create a new team, add a team configuration file within the teams/ directory of the org-config repository. Follow these steps:
- Navigate to the
org-configrepository main page. - Open the
teamsfolder. - Click the
Add file>Create new filebutton. - Enter your team name in the
Name your file...field. The file name must follow the<your-team-slug>.ymlpattern. For example, for a team namedinner-source-opsec, the filename would beinner-source-opsec.yml. - Add the team configuration properties in the file contents textarea. The team configuration file must follow the team configuration format.
description: >
Users who are granted write access to inner-source-opsec repos.
owners:
users:
- crisostomon
members:
users:
- crisostomon
- Wilson-Pimentel
teams:
- contributors-cap-git-flutter
- Click on the
Commit changes...button. - Add a
Commit message. - Click on
Propose changesto open a Pull Request.
After your pull request is open, CBG will run and display a comment similar to the image.

Once the pull request is approved and merged, CBG will create the team and apply any changes defined in the configuration.
Team Renaming
To rename a team, you can use two different methods:
- Using the
git mvcommand: Rename the team configuration file using thegit mvcommand. - Using the GitHub UI file explorer: Navigate to the
org-configrepository and rename the file using the GitHub UI file explorer.
In any method used, the Codebase Governor will detect the change and apply the rename.
Using git mv
To rename a team using git mv, follow these steps:
-
Clone the
org-configrepository:git clone git@github.com:Flutter-Global/org-config.git -
Create a new branch for the change. Replace
<name-of-branch>with your branch name.git checkout -b <name-of-branch> -
Navigate to the
teamsfolder.cd org-config/teams -
Rename the team configuration file, replacing
<old-team-config-file>and<new-team-config-file>with the team filenames, using the following command:git mv <old-team-config-file> <new-team-config-file> -
Add and commit the changes:
git add . git commit -m "renaming a team" -
Push the changes:
git push - Navigate to the
org-configrepository. - Open a PR based on the branch created.
After your pull request is open, CBG will run and display a comment similar to the image below.

Once the pull request is approved and merged, CBG will rename the team and apply any changes defined in the configuration.
Using the GitHub UI
To rename a team using the GitHub UI, follow these steps:
- Navigate to the
org-configrepository main page. - Open the
teamsfolder. - Open the team configuration file by clicking on it.
- Click on the
Edit this file(✏️) button. - In the team file name at the top left of the screen, replace the current name with the new one. The file name must follow the
<your-team-slug>.ymlpattern. For example, when renaming a team namedinner-source-opsectoinner-source-operations, the filename would beinner-source-operations.yml. - Click on the
Commit changes...button. - Add a
Commit message. - Click on
Propose changesto open a Pull Request.
After your pull request is open, CBG will run and display a comment similar to the image below.

Once the pull request is approved and merged, CBG will rename the team and apply any changes defined in the configuration.
Team Deletion
To delete a team, remove the team configuration file from the teams folder. The Codebase Governor will then remove the team.
To delete a team using the GitHub UI, follow these steps:
- Navigate to the
org-configrepository main page. - Open the
teamsfolder. - Open the team configuration file by clicking on it.
- Click on the
...>Delete filebutton. - Click on the
Commit changes...button. - Add a
Commit message. - Click on
Propose changesto open a Pull Request.
After your pull request is open, CBG will run and display a comment similar to the image below.

Once the pull request is approved and merged, CBG will delete the team.