W02 Team Activity: Create the Team Repository
Overview
- Purpose: Coordinate your work with your team.
- Task: Follow the instructions below to complete this week's team activity.
In this activity, your team will create the repository you will use for the rest of the course. You will also practice the pull request workflow that you will use on the team project.
By the end of the activity, every team member should have created a pull request, reviewed someone else's pull request, and merged an approved pull request.
Coordinate with your team
For this activity, you will need to coordinate with your team members. If possible, meet live in a Microsoft Teams video call. You can also work together by posting messages in your Microsoft Teams channel.
The important thing is that you make sure everyone can create pull requests, review them, and merge them into your repository.
About the Team Project
Your team will use a starter project called Kizuna Rail. Kizuna Rail is a fictional railway site with route information, station and schedule data, ticket options, a booking form, and confirmation pages.
This project is intentionally an existing codebase rather than a blank starter app. Part of your work this semester will be learning how the current application is organized before you make changes to it.
This team repository is separate from your individual Week 02 Books API assignment. Use the team repository for team practice and the team project, and keep your individual assignment work in your own Books API repository.
Why this matters
Working with a team in an existing codebase can be difficult. You will need to read unfamiliar code, coordinate changes with teammates, make small and focused pull requests, and review code that someone else wrote. This is also exactly the kind of work you will do in an internship and throughout your career.
Work together, but rotate roles
For this activity, only one person should create the team repository. After that, everyone should participate as a contributor, reviewer, and merger so the whole team understands the workflow.
Instructions
Choose a repository owner
Decide which team member will create the team repository. This person will be the initial repository owner and will add everyone else as collaborators.
- Choose one team member to create the repository.
- Make sure everyone knows the GitHub usernames for all team members.
Create the repository from the template
The repository owner should create the team repository from the Kizuna Rail starter template.
- Open the starter repository: https://github.com/byui-cse/cse341-ww-student-kizuna-rail.
- Click Use this template, then create a new repository. (If you don't see this option, make sure you are logged into GitHub.)
- Create the repository under the owner's GitHub account using a clear name like,
cse341-team-project. - Set the repository to be public.
- After the repository is created, copy the repository URL and share it with the team.
Add all team members as collaborators
The repository owner should invite every team member to collaborate on the repository.
- Open the new team repository on GitHub.
- Go to Settings, then select Collaborators.
- Add each team member by GitHub username.
- Each invited team member should accept the invitation.
Protect the main branch
Set up a rule for the main branch so pull requests require at least one review before they can be merged.
- In the team repository, open Settings.
- Expand the Rules option and select Rulesets.
- Create a new branch ruleset.
- Ruleset name: main branch protection
- Enforcement status: Active
- Target branches: Include Default Branch
- Select the option for Require a pull request before merging and select 1 as the number of required approvals.
- Ensure that Block force pushes option is selected.
- Click Create.
Do not skip branch protection
This setting helps prevent accidental direct changes to main. It also ensures that you get to practice reviewing each other's work before code is merged.
Clone the repository
Each team member should clone the team repository to their own computer. You can do this by using the VS Code option to Clone Git Repository... from the welcome page, or run the following command in your terminal:
git clone <team-repository-url>
After cloning, open the project in VS Code.
Practice the pull request workflow
Each team member should make a small local change, push a branch, and create a pull request. Keep the changes small so everyone has time to practice.
Suggested practice changes:
- Create a new file named
team-practice.mdif it does not already exist. - Add one note about the team workflow, such as a Git command, PR checklist item, review reminder, or setup tip.
- Do not add names, personal information, phone numbers, or personal schedules to this file.
For example, the file might contain content like this:
# Team Practice Notes
## Pull Request Workflow
- Pull the latest `main` branch before starting a new branch.
- Include testing notes in every pull request.
- Ask for review in the team Microsoft Teams channel when a PR is ready.
Each team member should do the following:
- Create a new branch with a short name, such as
add-practice-note:git switch -c add-practice-note - Make a small change locally.
- Check which files changed:
git status - Stage and commit the change:
git add team-practice.md git commit -m "Add team practice note" - Push the branch to GitHub:
git push origin add-practice-note - Create a pull request into
main. - Ask a teammate to review the pull request.
Review and merge pull requests
Rotate through the review and merge process so every team member gets practice.
- Each pull request should be reviewed by someone other than the author.
- The reviewer should confirm that the change is small and safe.
- The reviewer should add a comment and approve the pull request.
- After the pull request has an approving review, anyone on the team can merge it. Then, you can safely delete the branch at GitHub.
- Continue until every team member has created a pull request.
- Continue until every team member has reviewed or merged at least one pull request.
Clean up local branches after your pull request is merged
The original author (who has the local branch for a commit) should delete their local branch after the pull request is merged. For example:
git switch main
git pull origin main
git branch -d add-practice-note
Make sure everyone gets the latest updates
After someone else's pull request is merged, everyone should update their local main branch with git pull origin main before starting another branch.
Completion Checklist
- The team repository was created from the starter template.
- Every team member was added as a collaborator.
- The
mainbranch requires at least one review before pull requests can be merged. - Every team member cloned the repository.
- Every team member created a pull request.
- Every team member reviewed or merged at least one pull request.
- Everyone updated their local
mainbranch after the practice pull requests were merged.
Submission
When you are finished, return to Canvas to complete the team activity quiz. Be prepared to confirm that you know the team repository URL and that every team member was able to create, review, and merge pull requests.
Other Links:
- Return to: Week Overview | Course Home