EX01 Pomodoro Frontend Setup


Initialize The CSXL Repository

On your host machine, as was started in class, follow these instructions:

  1. From VSCode, open a new Window
  2. Command Palette > Git Clone: https://github.com/unc-csxl/csxl.unc.edu.git
  3. After cloning DO NOT follow automated suggestions! FIRST:
    1. Open docs/get_started.md
    2. Follow Before Starting a DevContainer: Establish a .env File
  4. After starting the container, complete the getting started steps

Setup Team on GitHub Classroom

  1. One member of the team should carefully create the team. Only one member needs to take this step first. Create a team named “EX01 NN” where the NN is the TEAM NUMBER of your group on the pairings page sent out via Canvas. Check it closely! Accept the assignment on behalf of your team and, after refreshing, it will create a repository at github.com/comp423-24s/csxl-ex01-pomodoro-front-end-team-NN. Assignment acceptance link: https://classroom.github.com/a/RDhFwB_E

  2. After completing Step 1, all other members of the team should join the correct team and accept the assignment to be added to the repository. Assignment acceptance link: https://classroom.github.com/a/RDhFwB_E

Add Team Remote to CSXL Repository

  1. Be sure to clone into your team assignment repository! From this point onward, you should only be working in that repo, not the “main” CSXL repo.

  2. In a terminal from the VSCode Devcontainer, let’s reconfigure our remotes: A. git remote rm origin - Removes the csxl origin remote B. get remote add origin <your team repo here> - Adds your team’s repo as the new origin C. git push origin main - Pushes to your team remo’s main branch (You should now see code show up on GitHub in your team project repo) D. git remote add upstream https://github.com/unc-csxl/csxl.unc.edu.git - Adds

  3. Fetch all branches from upstream and checkout:

    • get fetch --all
    • git checkout --track upstream/comp423/ex01-pomodoro-frontend
  4. Push the comp423/ex01-pomodoro-frontend branch to the origin remote (your team’s repository): git push origin comp423/ex01-pomodoro-frontend

  5. Your team will work off of a staging branch named stage, rather than the comp423/ex01-pomodoro-frontend branch. Go ahead and establish a stage branch locally and push it:

    • git switch --create stage
    • git push origin stage
  6. Only one team member needs to do complete the steps above. However, since the .env file is specific to each repository, both members will need to recreate it before you can run the dev container! Refer back to the docs/get_started.md file as needed.

GitHub Repository Configuration

After the team repository has been initialized, setup the following repository branch settings in GitHub:

  1. Settings
  2. General > Default Branch > Change Branch to stage
    • Press the Swap Button (not the Pencil!) and select stage
    • If you do not see stage, be sure you completed all the steps in “Initialize Team Repository”, then refresh this page and try again.
  3. Change to the Branches tab in the sidebar
    1. Add Branch Protection Rule to prevent any pushing to comp423/ex01-pomodoro-frontend
    2. Branch name pattern: comp423/ex01-pomodoro-frontend
    3. (Check) Lock branch
    4. (Check) Do not allow bypassing the above settings
    5. Save Changes with Create Button
  4. Add Branch Protection Rule to enforce a professional team workflow on stage
    1. Branch name pattern: stage
    2. (Check) Require a pull request before merging
      1. (Check) Require approvals: 1 required
      2. (Check) Dismiss stale pull request approvals when new commits are pushed
      3. (Check) Require approval of the most recent reviewable push
    3. (Check) Require conversation resolution before merging
    4. (Check) Require linear history
    5. (Check) Do not allow bypassing the above settings
    6. Save Changes
Contributor(s): Kris Jordan, Jade Keegan