Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in mermaid diagrams showing various workflows #45

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

astroDimitrios
Copy link
Member

@astroDimitrios astroDimitrios commented Jan 10, 2025

Fixes #28

Adds:

  • review process diagram
  • feature branch workflow diagram
  • forking and using feature branches workflow diagram

Review

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<br/>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<br/>review comment
      Developer->>Reviewer: Re-request a review
      Reviewer->>Reviewer: #32;
      Note over Reviewer: Respond to each review<br/>comment response
   end
   Reviewer->>Developer: Approve the pull request
Loading

Feature Branch

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<br/>Then: git pull
    create participant F as feature
    M ->> F: Create a feature branch:<br/>git switch -c feature
    loop
        F ->> F: #f
        Note over F: Develop changes:<br/>git add<br/>git commit
    end
    F -->> GHF: #f
    Note left of F: Push to GitHub: git push<br/>The first push creates origin feature!
    destroy GHF
    GHF ->> GHM: #f
    Note left of GHF: Pull Request and then Merge.<br/>Delete origin feature branch.
    GHM -->> M: #f
    Note right of GHM: git pull
    Note over F: Delete branch:<br/>git branch -D feature
    box GitHub Remote
    participant GHM
    participant GHF
    end
    box Local
    participant M
    participant F
    end
Loading

Fork

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<br/>Then: git pull
    create participant F as feature
    M ->> F: Create a feature branch:<br/>git switch -c feature
    loop
        F ->> F: #f
        Note over F: Develop changes:<br/>git add<br/>git commit
    end
    F -->> GHF: #f
    Note left of F: Push to GitHub: git push<br/>The first push creates origin feature!
    destroy GHF
    GHF -->> UM: #f
    Note left of GHF: Pull Request and then Merge.<br/>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:<br/>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
Loading

@astroDimitrios astroDimitrios merged commit 7e63174 into MetOffice:main Jan 10, 2025
1 check passed
@astroDimitrios astroDimitrios deleted the 28_diagrams branch January 10, 2025 13:37
github-actions bot pushed a commit to astroDimitrios/git-working-practices that referenced this pull request Jan 10, 2025
Auto-generated via `{sandpaper}`
Source  : 7e63174
Branch  : main
Author  : Dimitrios Theodorakis <[email protected]>
Time    : 2025-01-10 13:37:32 +0000
Message : MetOffice#45 Add in mermaid diagrams showing various workflows
github-actions bot pushed a commit to astroDimitrios/git-working-practices that referenced this pull request Jan 10, 2025
Auto-generated via `{sandpaper}`
Source  : ad5c38e
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2025-01-10 13:38:41 +0000
Message : markdown source builds

Auto-generated via `{sandpaper}`
Source  : 7e63174
Branch  : main
Author  : Dimitrios Theodorakis <[email protected]>
Time    : 2025-01-10 13:37:32 +0000
Message : MetOffice#45 Add in mermaid diagrams showing various workflows
github-actions bot pushed a commit to astroDimitrios/git-working-practices that referenced this pull request Jan 14, 2025
Auto-generated via `{sandpaper}`
Source  : ad5c38e
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2025-01-10 13:38:41 +0000
Message : markdown source builds

Auto-generated via `{sandpaper}`
Source  : 7e63174
Branch  : main
Author  : Dimitrios Theodorakis <[email protected]>
Time    : 2025-01-10 13:37:32 +0000
Message : MetOffice#45 Add in mermaid diagrams showing various workflows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Diagrams
1 participant