08. Merge Pull Request
In this section, you will finalize your individual work and then transition to a team workflow.
8.0 Team Setup (Critical)
Before merging your pull request, you must organize into sub-teams and set up your collaborative environment.
1. Split into Sub-Teams
Most project teams have 4-5 members. You need to split into smaller groups for this workshop:
- If you have 4 members: Split into two pairs (2 and 2).
- If you have 5 members: Split into one pair (2) and one trio (3).
2. Select a Working Repository
Decide whose repository your sub-team will use.
[!NOTE] You can choose any team member's repository as long as they have successfully completed Part 1 (have a PR ready to merge).
3. Add Collaborators
The Repo Owner must give their partner(s) access to the repository: 1. Go to your repository on GitHub. 2. Navigate to Settings > Collaborators. 3. Click Add people. 4. Enter the GitHub username(s) of your partner(s). 5. Select Maintainer access level. 6. Partners: Navigate to the repository page.
[!NOTE] You should be able to see the repository automatically on your dashboard or in the organization page. If you don't see it, check your email (or GitHub notifications) for an invitation.
4. Clone the Team Repository
CRITICAL STEP: Every member must ensure they are working on the selected team repository for the rest of this workshop.
- If you are the Owner: You can continue working in your existing Codespace or local environment.
- If you are a Partner:
- Close your current workspace/Codespace.
- Go to the Owner's repository on GitHub.
- Create a new Codespace (or clone locally) from their repo.
8.1 Merge the Pull Request
Now that the team is assembled, proceed to merge the pending Pull Request.
Using GitHub UI (Recommended)
Owner:
- Navigate to the repository on GitHub.
- Navigate to the Pull Request created in Part 1.
- Request a review from your partner(s) (Reviewers sidebar on the right).
Partner(s):
- Navigate to the repository on GitHub.
- Navigate to the Pull Request created in Part 1.
- Review the PR. This is a good time to practice code review! Approve it if it looks good.
- Scroll down to the bottom of the PR page.
- Ensure CI checks for tests have passed (green checkmark).
- Click the Merge pull request dropdown button.
- Click Confirm merge.
- Click Delete branch to clean up the
fastapi-setupbranch.
Update Project Board
After merging:
- Navigate to your project board.
- The linked issues should automatically move to the "Done" column. Otherwise, manually drag all issue cards (Issues #1-5) to the "Done" column.
8.2 Verify the Release
The release.yml workflow we set up will automatically create a release when a PR is merged to main.
- Navigate to the Actions tab in your repository.
- Watch the Release workflow execute.
- Once complete, go to the home page of the repository ("Code" tab).
- Go to the Releases section (on the right sidebar).
- On the Releases page, you should see a new release (e.g.,
v0.1.0or similar).
8.3 Prepare for Team Work
Now that your base application is on main, you are ready to start the team collaboration phase.
Proceed to Step 9: Team Feature Development.