Team formation and Repo setup

Team formation

For this chapter, we’re going to be working in groups of 3-4 participants. I’m going to allocate these groups randomly by sending you to break out rooms. Within your break out rooms, you will have 5 mins to introduce yourselves and decide on a group owner.

The group owner will:

  • be the main administrator of the project
  • be the one that makes a copy of the template repository
  • will be setting up repository permissions and adding collaborators.
  • will open issues for the rest of the team to work on and assign them to members of the team.
  • will be reviewing the code, merging pull requests and handling merge conflicts.

The rest of the team will:

  • be assigned a specific task (issue).
  • create a new branch to work in.
  • follow the instructions in their assigned issue to complete the task in their branch.
  • create a pull request from their branch to the new main branch.
  • make any corrections requested by the owner.

Complete team details

Once you have decide on a team repo owner, please copy the template provided in the course collaborative notepad and complete your team’s details


Team members (github usernames):
Team repo URL:
Team repo owner (github username):

Make a copy of project template

The project we will be working with and contributing to will be based on the repo:

This is slightly different than the previous repository we worked with in that it has been set up as a template. As such we don’t fork the repository. Instead we make a copy of the template.

The project owner of each team will make a copy of the template and the rest of the team will contribute to their own team copy of the repository.

To make a copy, first click on the Use this template button

For consistency, use the same name python-calculator for your own team projects. Add Basic calculator functions in python as the repo description.

Create your copy and the details of your team repository to the collaborative notepad so your team mates can access it.

Protect the main branch

You can create a branch protection rule to enforce certain workflows for one or more branches, such as requiring an approving review or passing status checks for all pull requests merged into the protected branch. People with admin permissions to a repository can manage branch protection rules.

Click on Settings on the top-right of the repo.

On the left-hand navigation bar, go to Branches

Next, under Branch protection rules click on the Add rule button

In the Branch name pattern field, enter main. This will apply the rule to any branch whose name matches the pattern main.

Next we’ll apply a branch protection rule. Under Protect matching branches, check the Require pull request reviews before merging checkbox. Leave the Required approving reviews as 1.

This rule means that all contributions to the main branch will have to be made from a separate branch through a pull request and will also require at least one approving review from a team member before it is merged. This means that at least one other person will have a look at any code contributed to the main branch, adding the opportunity to catch any errors before they are merged.

Find out more about Branch protection rules

Add your team mates as collaborators

Next, each team owner will add the rest of the team members as collaborators.

For each repository that you administer on GitHub, you can see an overview of every team or person with access to the repository. From the overview, you can also invite new teams or people, change each team or person’s permissions, or remove access to the repository.

Still under Settings , on the left-hand navigation bar, go to Manage access

Click on the Invite a collaborator button.

Next, search for your team mates’ github username and once you’ve found your team member, select their acccount to add.

Once selected, click on the Add team-member-username to this repository button.

The team member you added will now be visible on the Manage access panel and will show a Pending invite status until they accept the invitation.

Repeat the process untill all team members are added.

Accept the invitation to the repository

Before we move on, make sure the rest of your team has accepted the invitation to the repository.

You can accept the invitation by visiting[UserName]/python-calculator/invitations, substituting [UserName] with your team repository owner’s username.