diff --git a/episodes/04-review.md b/episodes/04-review.md index 68a0167..7cc9c99 100644 --- a/episodes/04-review.md +++ b/episodes/04-review.md @@ -20,6 +20,32 @@ exercises: 10 In this section we will explore how to properly review code and suggest changes if necessary. +Both science and code reviews happen in a Pull Request. +The general process is outlined in the diagram below: + +```mermaid +sequenceDiagram + accDescr {A sequence diagram showing the process of reviewing.} + autonumber + actor Developer + actor Reviewer + + Developer->>Reviewer: Request a reviewer + Reviewer->>Reviewer: #32; + Note over Reviewer: Add the reviewer
to the pull request + Reviewer->>Reviewer: #32; + Note over Reviewer: Perform the review + loop + Reviewer->>Developer: Submit the review + Developer->>Developer: #32; + Note over Developer: Respond to each
review comment + Developer->>Reviewer: Re-request a review + Reviewer->>Reviewer: #32; + Note over Reviewer: Respond to each review
comment response + end + Reviewer->>Developer: Approve the pull request +``` + Make sure you know who is in your pair. Find your colleagues open PR on the `git-training-demo` repository using the Pull Requests tab diff --git a/episodes/05-forks.md b/episodes/05-forks.md index ae7e92f..9525679 100644 --- a/episodes/05-forks.md +++ b/episodes/05-forks.md @@ -278,6 +278,60 @@ on your local `main` branch. ::: +## Summary Diagram + +The workflow for forking is similar to that for branching. +There are only a few differences after you've set up your fork +for the first time: + +- You should open Issues on the upstream repository not your fork. +- After merging in a PR on the upstream repository you need the + added step of syncing your forks `main` branch. + +```mermaid +sequenceDiagram + accDescr {A sequence diagram showing the steps for using + Forks with the branching model.} + autonumber + participant UM as upstream main + participant GHM as origin main + participant GHF as origin feature + participant M as main + UM ->> UM: #f + Note over UM: Open an Issue for the change + UM -->> GHM: #f + Note right of UM: First time: Fork the repository + GHM -->> M: #f + Note right of GHM: First time: git clone
Then: git pull + create participant F as feature + M ->> F: Create a feature branch:
git switch -c feature + loop + F ->> F: #f + Note over F: Develop changes:
git add
git commit + end + F -->> GHF: #f + Note left of F: Push to GitHub: git push
The first push creates origin feature! + destroy GHF + GHF -->> UM: #f + Note left of GHF: Pull Request and then Merge.
Delete origin feature branch. + UM -->> GHM: #f + Note right of UM: Sync your fork + GHM -->> M: #f + Note right of GHM: git pull + Note over F: Delete branch:
git branch -d feature + box Upstream Remote - GitHub + participant UM + end + box Fork Remote - GitHub + participant GHM + participant GHF + end + box Fork - Local + participant M + participant F + end +``` + :::::::::::::::::::::::::::::::::::::::: keypoints - A fork is a server side, in our case GitHub, copy diff --git a/episodes/Break.md b/episodes/Break.md index 1bd794c..95d1c5d 100644 --- a/episodes/Break.md +++ b/episodes/Break.md @@ -11,9 +11,42 @@ You've now used the Feature Branch model to: 3. Create a branch to develop your changes on 4. Make changes to your working copy 5. Open a Pull Request -6. Review changes -7. Respond to review -8. Merge the Pull Request and close the Issue -9. Tidy up your branches +6. Respond to review +7. Update your local copy and tidy up your branches + +```mermaid +sequenceDiagram + accDescr {A sequence diagram showing the steps for the branching model.} + autonumber + participant GHM as origin main + participant GHF as origin feature + participant M as main + GHM -->> GHM: #f + Note over GHM: Open an Issue for the change + GHM -->> M: #f + Note right of GHM: First time: git clone
Then: git pull + create participant F as feature + M ->> F: Create a feature branch:
git switch -c feature + loop + F ->> F: #f + Note over F: Develop changes:
git add
git commit + end + F -->> GHF: #f + Note left of F: Push to GitHub: git push
The first push creates origin feature! + destroy GHF + GHF ->> GHM: #f + Note left of GHF: Pull Request and then Merge.
Delete origin feature branch. + GHM -->> M: #f + Note right of GHM: git pull + Note over F: Delete branch:
git branch -D feature + box GitHub Remote + participant GHM + participant GHF + end + box Local + participant M + participant F + end +``` Take a break - get up and move about.