github.com/zppinho/prow@v0.0.0-20240510014325-1738badeb017/pkg/docs/pr-interactions-sequence.mmd (about)

     1  sequenceDiagram
     2    participant Contributor
     3    participant Reviewer
     4    participant Approver
     5    participant GitHub
     6    participant hook
     7    participant approve as approve<br/>(hook plugin)
     8    participant size as size<br/>(hook plugin)
     9    participant cla as cla<br/>(hook plugin)
    10    participant lgtm as lgtm<br/>(hook plugin)
    11    participant trigger as trigger<br/>(hook plugin)
    12    participant tide
    13    participant prowJob
    14    participant k8s as Kubernetes<br/>API Server
    15  
    16    Contributor->>GitHub: Creates Pull Request (PR)
    17    GitHub->>hook: Sends PR create webhook
    18    hook->>approve: Sends PR create webhook
    19    approve->>approve: Analyzes repository approvers
    20    approve->>GitHub: Create PR comment "PR not approved"
    21    hook->>size: Send PR create webhook
    22    size->>size: Analyzes PR changed line count
    23    size->>GitHub: Adds "size/XS" label to PR
    24    hook->>cla: Send PR create webhook
    25    cla->>cla: Analyzes if Contributor is CLA approved
    26    cla->>GitHub: Adds "cncf-cla: yes" label to PR
    27  
    28    hook->>GitHub: Adds Reviewers to PR
    29    GitHub->>Reviewer: Requests Review (Normally an Email)
    30    Reviewer->>GitHub: Requests PR Changes
    31    Contributor->>GitHub: Make Changes Reviewer Requested
    32    Reviewer->>GitHub: Creates a "/lgtm" Comment
    33    GitHub->>hook: Sends comment Event
    34    hook->>lgtm: Sends comment Event
    35    lgtm->>lgtm: Analyzes OWNERS files
    36    lgtm->>GitHub: Adds "lgtm" label to PR
    37  
    38    Reviewer->>GitHub: Creates an "/ok-to-test" Comment
    39    hook->>GitHub: Adds "ok-to-test" label to PR
    40    trigger->>k8s: Create presubmit prowJob
    41    k8s->>prowJob: Run presubmit prowJob
    42    prowJob->>GitHub: Update PR "statuses" based on job exit code
    43  
    44    Approver->>GitHub: Creates an "/approved" Comment
    45    GitHub->>approve: Sends comment Event
    46    approve->>approve: Analyzes if Approver can approve PR
    47    approve->>GitHub: Adds an "approved" label to PR
    48  
    49    tide->>GitHub: Checks if All Merge Labels Exist on PR
    50    tide->>GitHub: Merges PR
    51